Explorar o código

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>
Glen Lee %!s(int64=10) %!d(string=hai) anos
pai
achega
608b0515b7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/staging/wilc1000/wilc_wlan.c

+ 1 - 0
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);