linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mac80211: fix memory leak
@ 2016-02-02  7:51 Sudip Mukherjee
  2016-02-02 15:14 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2016-02-02  7:51 UTC (permalink / raw)
  To: Johannes Berg, David S. Miller
  Cc: linux-kernel, linux-wireless, Julian Calaby, Kalle Valo

From: Sudip Mukherjee <sudip@vectorindia.org>

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>
---

v2: added Fixes tag, Reviewed-by and From:.

 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mac80211: fix memory leak
  2016-02-02  7:51 [PATCH v2] mac80211: fix memory leak Sudip Mukherjee
@ 2016-02-02 15:14 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2016-02-02 15:14 UTC (permalink / raw)
  To: Sudip Mukherjee, David S. Miller
  Cc: linux-kernel, linux-wireless, Julian Calaby, Kalle Valo

On Tue, 2016-02-02 at 13:21 +0530, Sudip Mukherjee wrote:
> From: Sudip Mukherjee <sudip@vectorindia.org>
> 
> On error we jumped to the error label and returned the error code but
> we missed releasing sinfo.
> 
Applied.

johannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-02 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02  7:51 [PATCH v2] mac80211: fix memory leak Sudip Mukherjee
2016-02-02 15:14 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).