提交 83826469 编写于 作者: W weiyongjun (A) 提交者: Johannes Berg

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: 230ebaa1 ("cfg80211: read wmm rules from regulatory database")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
[johannes: add Fixes tag]
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 a7cfebcb
......@@ -1026,6 +1026,7 @@ static int regdb_query_country(const struct fwdb_header *db,
if (!tmp_rd) {
kfree(regdom);
kfree(wmm_ptrs);
return -ENOMEM;
}
regdom = tmp_rd;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册