diff mbox

nl80211: Fix potential memory leak in nl80211_set_wowlan

Message ID 1449958637-2766-1-git-send-email-ola1olsson@gmail.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Ola Olsson Dec. 12, 2015, 10:17 p.m. UTC
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(+)

Comments

Johannes Berg Dec. 15, 2015, 12:11 p.m. UTC | #1
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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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