Skip to contentSkip to conversation

nl80211: Fix potential memory leak in nl80211_set_wowlan

PATCH Applied Ola Olsson 2 participants 2 messages Dec 12, 2015 – Dec 15, 2015 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Ola Olsson

author
#0 lore raw

PATCH 1/1 nl80211: Fix potential memory leak in nl80211_set_wowlan

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

---
 net/wireless/nl80211.c |    1 +
 1 file changed, 1 insertion(+)
net/wireless/nl80211.c +1 -0
index 4b5ff71..75b0d23 100644
@@ -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
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 4 lines · Ola Olsson

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

Applied.

johannes