mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: 230ebaa189 ("cfg80211: read wmm rules from regulatory database")
Signed-off-by: Wei Yongjun <[email protected]>
[johannes: add Fixes tag]
Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
a7cfebcb75
commit
83826469e3
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue