Skip to content

Commit e3ac93e

Browse files
Dan Carpenterjmberg-intel
authored andcommitted
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: 7b6f16a ("wifi: mwifiex: add rgpower table loading support") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Francesco Dolcini <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent e53f8b1 commit e3ac93e

File tree

1 file changed

+1
-3
lines changed
  • drivers/net/wireless/marvell/mwifiex

1 file changed

+1
-3
lines changed

drivers/net/wireless/marvell/mwifiex/sta_cmd.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,10 +1521,8 @@ int mwifiex_send_rgpower_table(struct mwifiex_private *priv, const u8 *data,
15211521
return -ENOMEM;
15221522

15231523
_data = kmemdup(data, size, GFP_KERNEL);
1524-
if (!_data) {
1525-
kfree(hostcmd);
1524+
if (!_data)
15261525
return -ENOMEM;
1527-
}
15281526

15291527
pos = _data;
15301528
ptr = hostcmd->cmd;

0 commit comments

Comments
 (0)