diff options
author | Bob Copeland <me@bobcopeland.com> | 2016-09-14 08:42:36 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-09-17 18:25:57 +0300 |
commit | 92ca4f92eca7aa362d51f7657d3fea47861600ee (patch) | |
tree | 6fe6dcf7d347adf4f7f285325b58e5805396435d /tools/perf/scripts/python/stackcollapse.py | |
parent | f1785fbf7c0bc17211c299a647ebc38968a42181 (diff) |
mwifiex: fix error handling in mwifiex_create_custom_regdomain
smatch reports:
sta_cmdresp.c:1053 mwifiex_create_custom_regdomain() warn: possible memory leak of 'regd'
Indeed, mwifiex_create_custom_regdomain() returns NULL in the
case that channel is missing in the TLV without freeing regd.
Moreover, some other error paths in this function return ERR_PTR
values which are assigned without checking to the regd field in
the mwifiex_adapter struct. The latter is only null-checked where
used.
Fix by freeing regd in the error path, and only update
priv->adapter->regd if the returned pointer is valid.
Cc: Amitkumar Karwar <akarwar@marvell.com>
Cc: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions