Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d080e275 authored by Yuri Ershov's avatar Yuri Ershov Committed by John W. Linville
Browse files

nl80211: Fix memory leaks



In case of errors during message composing msg should be freed after canceling.

Signed-off-by: default avatarYuri Kululin <ext-yuri.kululin@nokia.com>
Signed-off-by: default avatarYuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e4ab7eb0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2769,6 +2769,7 @@ static int nl80211_get_mesh_params(struct sk_buff *skb,

 nla_put_failure:
	genlmsg_cancel(msg, hdr);
	nlmsg_free(msg);
	err = -EMSGSIZE;
 out:
	/* Cleanup */
@@ -2960,6 +2961,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)

nla_put_failure:
	genlmsg_cancel(msg, hdr);
	nlmsg_free(msg);
	err = -EMSGSIZE;
out:
	mutex_unlock(&cfg80211_mutex);