From: Johannes Berg Date: Thu, 2 Jul 2009 13:46:41 +0000 (+0200) Subject: cfg80211: fix refcount leak X-Git-Tag: v2.6.31-rc3~40^2~5^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2dce4c2b5f0b43bd25bf9ea6ded06b7f8a54c91f;p=platform%2Fupstream%2Fkernel-adaptation-pc.git cfg80211: fix refcount leak The code in cfg80211's cfg80211_bss_update erroneously grabs a reference to the BSS, which means that it will never be freed. Signed-off-by: Johannes Berg Cc: stable@kernel.org [2.6.29, 2.6.30] Signed-off-by: John W. Linville --- diff --git a/net/wireless/scan.c b/net/wireless/scan.c index e95b638..f8e71b3 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -366,7 +366,6 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, found = rb_find_bss(dev, res); if (found) { - kref_get(&found->ref); found->pub.beacon_interval = res->pub.beacon_interval; found->pub.tsf = res->pub.tsf; found->pub.signal = res->pub.signal;