projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7cfebc
)
cfg80211: fix possible memory leak in regdb_query_country()
author
weiyongjun (A)
<weiyongjun1@huawei.com>
Fri, 30 Mar 2018 02:07:05 +0000
(
02:07
+0000)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 19 Apr 2018 15:02:53 +0000
(17:02 +0200)
'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:
230ebaa189af
("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
patch
|
blob
|
history
diff --git
a/net/wireless/reg.c
b/net/wireless/reg.c
index
16c7e4e
..
ac3e12c
100644
(file)
--- a/
net/wireless/reg.c
+++ b/
net/wireless/reg.c
@@
-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;