Search Linux Wireless

[PATCH 12/12] staging: wilc1000: bug fix on memory free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/staging/wilc1000/wilc_wlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 00f3464..83af51b 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);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux