Skip to content

Commit

Permalink
nl80211: Fix potential memory leak in nl80211_set_wowlan
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Ola Olsson authored and Johannes Berg committed Dec 15, 2015
1 parent 09d1180 commit e5dbe07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5dbe07

Please sign in to comment.