projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03efae3
)
staging: wilc1000: bug fix on memory free
author
Glen Lee
<glen.lee@atmel.com>
Mon, 21 Dec 2015 05:18:50 +0000
(14:18 +0900)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 21:21:09 +0000
(13:21 -0800)
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>
drivers/staging/wilc1000/wilc_wlan.c
patch
|
blob
|
history
diff --git
a/drivers/staging/wilc1000/wilc_wlan.c
b/drivers/staging/wilc1000/wilc_wlan.c
index 00f346454e004d8fbd1520fa04c77db73f5c8f54..83af51bb83e8bd775408b060ee20dd9a0bf4b7a5 100644
(file)
--- 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);