Commit 339a7c41 authored by Committed by David S. Miller
mac80211: Do not free net device after it is unregistered.
The error path in ieee80211_register_hw() may call the unregister_netdev() and right after it - the free_netdev(), which is wrong, since the unregister releases the device itself. So the proposed fix is to NULL the local->mdev after unregister is done and check this before calling free_netdev(). I checked - no code uses the local->mdev after unregister in this error path (but even if some did this would be a BUG). Signed-off-by: Pavel Emelyanov <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com>
Showing with 5 additions and 2 deletions