summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wlan.c
diff options
context:
space:
mode:
authorGlen Lee2015-12-21 06:18:50 +0100
committerGreg Kroah-Hartman2015-12-21 22:21:09 +0100
commit608b0515b75292a3f890356f976849050c519d6a (patch)
tree09d95231fcbad4e01c1f469edfb7c67d5c8aeb6e /drivers/staging/wilc1000/wilc_wlan.c
parentstaging: wilc1000: set hif_drv before it is used (diff)
downloadkernel-qcow2-linux-608b0515b75292a3f890356f976849050c519d6a.tar.gz
kernel-qcow2-linux-608b0515b75292a3f890356f976849050c519d6a.tar.xz
kernel-qcow2-linux-608b0515b75292a3f890356f976849050c519d6a.zip
staging: wilc1000: bug fix on memory free
Set tx_buffer to NULL not to free again the memory that is already freed, which could cause system crash when device is failed. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wlan.c')
-rw-r--r--drivers/staging/wilc1000/wilc_wlan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 00f346454e00..83af51bb83e8 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1374,6 +1374,7 @@ void wilc_wlan_cleanup(struct net_device *dev)
kfree(wilc->rx_buffer);
wilc->rx_buffer = NULL;
kfree(wilc->tx_buffer);
+ wilc->tx_buffer = NULL;
acquire_bus(wilc, ACQUIRE_AND_WAKEUP);