linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nl80211: Fix potential memory leak in nl80211_set_wowlan
@ 2015-12-12 22:17 Ola Olsson
  2015-12-15 12:11 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ola Olsson @ 2015-12-12 22:17 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Ola Olsson, Ola Olsson

Compared to cfg80211_rdev_free_wowlan in core.h,
the error goto label lacks the freeing of nd_config.
Fix that.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
---
 net/wireless/nl80211.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4b5ff71..75b0d23 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9505,6 +9505,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
 	if (new_triggers.tcp && new_triggers.tcp->sock)
 		sock_release(new_triggers.tcp->sock);
 	kfree(new_triggers.tcp);
+	kfree(new_triggers.nd_config);
 	return err;
 }
 #endif
-- 
1.7.9.5


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

* Re: [PATCH] nl80211: Fix potential memory leak in nl80211_set_wowlan
  2015-12-12 22:17 [PATCH] nl80211: Fix potential memory leak in nl80211_set_wowlan Ola Olsson
@ 2015-12-15 12:11 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-12-15 12:11 UTC (permalink / raw)
  To: Ola Olsson; +Cc: linux-wireless, Ola Olsson

On Sat, 2015-12-12 at 23:17 +0100, Ola Olsson wrote:
> Compared to cfg80211_rdev_free_wowlan in core.h,
> the error goto label lacks the freeing of nd_config.
> Fix that.
> 
Applied.

johannes

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

end of thread, other threads:[~2015-12-15 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-12 22:17 [PATCH] nl80211: Fix potential memory leak in nl80211_set_wowlan Ola Olsson
2015-12-15 12:11 ` 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).