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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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);
ar6000_stop_ap_interface(ar);
unregister_netdev(arApNetDev);
-#ifndef free_netdev
- kfree(arApNetDev);
-#else
free_netdev(apApNetDev);
-#endif
A_PRINTF("Remove AP interface\n");
}