]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mac80211: fix memory leak
authorSudip Mukherjee <sudip@vectorindia.org>
Tue, 2 Feb 2016 07:51:14 +0000 (13:21 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:05:50 +0000 (00:05 +0200)
commit ea32f065bd3e3e09f0bcb3042f1664caf6b3e233 upstream.

On error we jumped to the error label and returned the error code but we
missed releasing sinfo.

Fixes: 5fe74014172d ("mac80211: avoid excessive stack usage in sta_info")
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/mac80211/sta_info.c

index 81cd2e7f1e7de90d1f8882c966d54b906e36d43d..c006801f3d8352f6baf0fa9e1929a8d1fde584fc 100644 (file)
@@ -551,6 +551,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
        __cleanup_single_sta(sta);
  out_err:
        mutex_unlock(&local->sta_mtx);
+       kfree(sinfo);
        rcu_read_lock();
        return err;
 }