staging: wilc1000: fix potential memory leak
authorTony Cho <tony.cho@atmel.com>
Mon, 7 Sep 2015 10:09:31 +0000 (19:09 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:45 +0000 (18:24 -0700)
commitf638dd3918a4caa910ce62176d2d185203867876
treed0a4e18997fb9420564bc2a8c0f8a5ef3590f6f0
parent700db05372bf44eb44a6e0bbae749ef0d538b192
staging: wilc1000: fix potential memory leak

This patch adds kfree(mgmt_tx) when memory allocation of mgmt_tx->buff
fails in the second calls of kmalloc() to avoid the memory leak from mgmt_tx
first allocated before the second calls of kmalloc().

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Chris Park <chirs.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_mon.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c