From: Ola Olsson Date: Sat, 12 Dec 2015 22:17:17 +0000 (+0100) Subject: nl80211: Fix potential memory leak in nl80211_set_wowlan X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5dbe0701a0d7c6127f313a0f68f960176f0209e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Signed-off-by: Ola Olsson Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index c71e274c810a..624174f20b1f 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -9503,6 +9503,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