mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
nl80211: Fix memory leaks
In case of errors during message composing msg should be freed after canceling. Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com> Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
1 parent
e4ab7eb0ae
commit
d080e2755d
1 file changed
+2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user