Skip to content

Commit

Permalink
mac80211: free skb on error path of ieee80211_ibss_join()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Wunderlich authored and John W. Linville committed Dec 14, 2011
1 parent 38c9d66 commit cb71b8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit cb71b8d

Please sign in to comment.