Return-path: Received: from eusmtp01.atmel.com ([212.144.249.243]:13869 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbbLNFod (ORCPT ); Mon, 14 Dec 2015 00:44:33 -0500 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH 12/12] staging: wilc1000: bug fix on memory free Date: Mon, 14 Dec 2015 14:47:03 +0900 Message-ID: <1450072023-13013-13-git-send-email-glen.lee@atmel.com> (sfid-20151214_070058_028575_0928B410) In-Reply-To: <1450072023-13013-1-git-send-email-glen.lee@atmel.com> References: <1450072023-13013-1-git-send-email-glen.lee@atmel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: 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 --- 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