提交 608b0515 编写于 作者: G Glen Lee 提交者: Greg Kroah-Hartman

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: NGlen Lee <glen.lee@atmel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 03efae32
...@@ -1374,6 +1374,7 @@ void wilc_wlan_cleanup(struct net_device *dev) ...@@ -1374,6 +1374,7 @@ void wilc_wlan_cleanup(struct net_device *dev)
kfree(wilc->rx_buffer); kfree(wilc->rx_buffer);
wilc->rx_buffer = NULL; wilc->rx_buffer = NULL;
kfree(wilc->tx_buffer); kfree(wilc->tx_buffer);
wilc->tx_buffer = NULL;
acquire_bus(wilc, ACQUIRE_AND_WAKEUP); acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册