Skip to content

Commit cb71b8d

Browse files
Simon Wunderlichlinvjw
authored andcommitted
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 <siwu@hrz.tu-chemnitz.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 38c9d66 commit cb71b8d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/mac80211/ibss.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
995995
if (!ieee80211_set_channel_type(sdata->local, sdata,
996996
params->channel_type)) {
997997
mutex_unlock(&sdata->u.ibss.mtx);
998+
kfree_skb(skb);
998999
return -EINVAL;
9991000
}
10001001
}

0 commit comments

Comments
 (0)