Thread (4 messages) 4 messages, 2 authors, 2016-02-01

[PATCH] mac80211: fix memory leak

flat view
STALE3923d

From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: 2016-01-29 09:49:16
Also in: linux-wireless, lkml
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

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

Signed-off-by: Sudip Mukherjee <redacted>
---
 net/mac80211/sta_info.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 6c198e6..36e75c4 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -561,6 +561,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;
 }
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help