aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/core.c2
-rw-r--r--net/wireless/scan.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 3cccd1390cea..0668b2bfc1da 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -376,7 +376,7 @@ void cfg80211_dev_free(struct cfg80211_registered_device *drv)
376 mutex_destroy(&drv->mtx); 376 mutex_destroy(&drv->mtx);
377 mutex_destroy(&drv->devlist_mtx); 377 mutex_destroy(&drv->devlist_mtx);
378 list_for_each_entry_safe(scan, tmp, &drv->bss_list, list) 378 list_for_each_entry_safe(scan, tmp, &drv->bss_list, list)
379 kfree(scan); 379 cfg80211_put_bss(&scan->pub);
380 kfree(drv); 380 kfree(drv);
381} 381}
382 382
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 009d12810c55..ec148f68a62b 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -56,6 +56,8 @@ static void bss_release(struct kref *ref)
56 struct cfg80211_internal_bss *bss; 56 struct cfg80211_internal_bss *bss;
57 57
58 bss = container_of(ref, struct cfg80211_internal_bss, ref); 58 bss = container_of(ref, struct cfg80211_internal_bss, ref);
59 if (bss->pub.free_priv)
60 bss->pub.free_priv(&bss->pub);
59 kfree(bss); 61 kfree(bss);
60} 62}
61 63