mac80211: don't leak next beacon when csa is aborted
authorSimon Wunderlich <sw@simonwunderlich.de>
Thu, 21 Nov 2013 17:19:53 +0000 (18:19 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 2 Dec 2013 10:51:55 +0000 (11:51 +0100)
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c

index a66f4f1eb86009beffaf39ea3a6ac3994c74a444..754069cbb7568474c7bd87060613ec12facf6d9a 100644 (file)
@@ -1080,6 +1080,9 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
 
        /* abort any running channel switch */
        sdata->vif.csa_active = false;
+       kfree(sdata->u.ap.next_beacon);
+       sdata->u.ap.next_beacon = NULL;
+
        cancel_work_sync(&sdata->u.ap.request_smps_work);
 
        /* turn off carrier for this interface and dependent VLANs */