[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1285693675-4637-1-git-send-email-segooon@gmail.com>
Date: Tue, 28 Sep 2010 21:07:55 +0400
From: Vasiliy Kulikov <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...e.de>,
Vipin Mehta <vmehta@...eros.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Joe Perches <joe@...ches.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 5/9] staging: ath6kl: use free_netdev(netdev) instead of kfree()
It is not guaranteed that free_netdev() is macro.
Freeing netdev without free_netdev() leads to net, tx leaks.
I might lead to dereferencing freed pointer.
Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index daba6e4..c5a6d6c 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -2143,11 +2143,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister)
unregister_netdev(dev);
is_netdev_registered = 0;
}
-#ifndef free_netdev
- kfree(dev);
-#else
free_netdev(dev);
-#endif
#ifdef ATH6K_CONFIG_CFG80211
ar6k_cfg80211_deinit(ar);
@@ -6429,11 +6425,7 @@ A_STATUS ar6000_remove_ap_interface(AR_SOFTC_T *ar)
ar6000_stop_ap_interface(ar);
unregister_netdev(arApNetDev);
-#ifndef free_netdev
- kfree(arApNetDev);
-#else
free_netdev(apApNetDev);
-#endif
A_PRINTF("Remove AP interface\n");
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists