From cb71b8d80334add8991862f9fd36dc50874944ce Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Wed, 14 Dec 2011 13:33:30 +0100 Subject: [PATCH] mac80211: free skb on error path of ieee80211_ibss_join() Our new return also created a memleak. The skb should be freed before returning an error. Signed-off-by: Simon Wunderlich Signed-off-by: John W. Linville --- net/mac80211/ibss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 0fc9752facea..fe0e91e0b8bc 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -995,6 +995,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, if (!ieee80211_set_channel_type(sdata->local, sdata, params->channel_type)) { mutex_unlock(&sdata->u.ibss.mtx); + kfree_skb(skb); return -EINVAL; } } -- 2.30.2