summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudip Mukherjee <sudip@vectorindia.org>2016-02-02 13:21:14 +0530
committerBen Hutchings <ben@decadent.org.uk>2016-05-01 00:05:50 +0200
commitf4f8ac416a878ec45e4f560aae657246eee009c1 (patch)
tree427e8504550fdf75604effd4edd8d3f7aebda137
parentad86e29c3b2f2f9deefb7155f96fd9d8e5d42a75 (diff)
mac80211: fix memory leak
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>
-rw-r--r--net/mac80211/sta_info.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 81cd2e7f1e7d..c006801f3d83 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -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;
}