mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
wifi: mwifiex: fix double free in mwifiex_send_rgpower_table()
The "hostcmd" is freed using cleanup.h, so calling kfree() will lead to
a double free. Delete the kfree().
Fixes: 7b6f16a258 ("wifi: mwifiex: add rgpower table loading support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/aLqZBh5_dSHUb4AE@stanley.mountain
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e53f8b12a2
commit
e3ac93e9d9
|
|
@ -1521,10 +1521,8 @@ int mwifiex_send_rgpower_table(struct mwifiex_private *priv, const u8 *data,
|
|||
return -ENOMEM;
|
||||
|
||||
_data = kmemdup(data, size, GFP_KERNEL);
|
||||
if (!_data) {
|
||||
kfree(hostcmd);
|
||||
if (!_data)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pos = _data;
|
||||
ptr = hostcmd->cmd;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user