]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix possible memory leak in regdb_query_country()
authorweiyongjun (A) <weiyongjun1@huawei.com>
Fri, 30 Mar 2018 02:07:05 +0000 (02:07 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 19 Apr 2018 15:02:53 +0000 (17:02 +0200)
commitd8e0d5a9591af128ad440dd70b599340aad01283
tree1c1f2887c220bd7f3cdcadcaa2b3d06839df4211
parentf05a0a671d68d72087f35d68ebeacf2f54450a5f
cfg80211: fix possible memory leak in regdb_query_country()

'wmm_ptrs' is malloced in regdb_query_country() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: 00a13eb12e0f ("cfg80211: read wmm rules from regulatory database")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
[johannes: add Fixes tag]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c