In case of errors during message composing msg should be freed after canceling. Signed-off-by: Yuri Kululin <ext-yuri.kululin@xxxxxxxxx> Signed-off-by: Yuri Ershov <ext-yuri.ershov@xxxxxxxxx> --- net/wireless/nl80211.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a999fc1..c6bff6b 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -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); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html