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>
This commit is contained in:
Simon Wunderlich 2011-12-14 13:33:30 +01:00 committed by John W. Linville
parent 38c9d6641f
commit cb71b8d803
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}