mac80211: free netdev on dev_alloc_name() error
commite34cacd27f477800cb37cffbd055b0560a94065e
authorJohannes Berg <johannes.berg@intel.com>
Fri, 9 Jun 2017 19:33:09 +0000 (9 21:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:41:34 +0000 (5 14:41 +0200)
tree46a7fcd2ef51fb56b6e54a3fc76f091747f8085a
parent64603b75f8f625437866b896bbad466459dcf7ed
mac80211: free netdev on dev_alloc_name() error

[ Upstream commit c7a61cba71fd151cc7d9ebe53a090e0e61eeebf3 ]

The change to remove free_netdev() from ieee80211_if_free()
erroneously didn't add the necessary free_netdev() for when
ieee80211_if_free() is called directly in one place, rather
than as the priv_destructor. Add the missing call.

Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/iface.c