]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: fix possible memory leak nl80211_connect()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 2 Sep 2012 13:41:04 +0000 (21:41 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Sep 2012 16:06:00 +0000 (18:06 +0200)
commitaba840aa8f47440508bb77c42e7b9a134abd7296
treeb7cfe228d939d69b217c4b632abf57184e7a894f
parent7aa6253d67faf4f9b2e5879bf0baef4130cca61d
nl80211: fix possible memory leak nl80211_connect()

connkeys is malloced in nl80211_parse_connkeys() and should
be freed in the error handling case, otherwise it will cause
memory leak.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c