浏览代码

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>
Simon Wunderlich 13 年之前
父节点
当前提交
cb71b8d803
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/mac80211/ibss.c

+ 1 - 0
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;
 		}
 	}