]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mac80211: fix TX aggregation TID struct leak
authorJohannes Berg <johannes.berg@intel.com>
Wed, 12 Jun 2013 20:47:56 +0000 (22:47 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 12 Jun 2013 22:16:37 +0000 (00:16 +0200)
Ben reports that kmemleak is saying TX aggregation TID
structs are leaked. Given his workload, I suspect that
they're leaked because stations are destroyed before
their aggregation sessions get a chance to start. Fix
this by simply freeing structs that are not used yet.

Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/sta_info.c

index b4297982d34ad19adc9c815491c153964aecd7a1..aaf68d297221fc2f772546c81d5ff4224277f810 100644 (file)
@@ -149,6 +149,7 @@ static void cleanup_single_sta(struct sta_info *sta)
         * directly by station destruction.
         */
        for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
+               kfree(sta->ampdu_mlme.tid_start_tx[i]);
                tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
                if (!tid_tx)
                        continue;