diff options
author | Michael Vassernis <michael.vassernis@tandemg.com> | 2019-10-03 09:31:38 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-10-04 13:59:48 +0200 |
commit | 313c3fe9c2348e7147eca38bb446f295b45403a0 (patch) | |
tree | 5243d71e65de2044ffbe6549554b0aa993b3e9be /drivers/net/wireless/mac80211_hwsim.c | |
parent | tcp: fix slab-out-of-bounds in tcp_zerocopy_receive() (diff) | |
download | linux-313c3fe9c2348e7147eca38bb446f295b45403a0.tar.xz linux-313c3fe9c2348e7147eca38bb446f295b45403a0.zip |
mac80211_hwsim: fix incorrect dev_alloc_name failure goto
If dev_alloc_name fails, hwsim_mon's memory allocated in alloc_netdev
needs to be freed.
Change goto command in dev_alloc_name failure to out_free_mon in
order to perform free_netdev.
Signed-off-by: Michael Vassernis <michael.vassernis@tandemg.com>
Link: https://lore.kernel.org/r/20191003073049.3760-1-michael.vassernis@tandemg.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 45c73a6f09a1..14f562cd715c 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -4026,7 +4026,7 @@ static int __init init_mac80211_hwsim(void) err = dev_alloc_name(hwsim_mon, hwsim_mon->name); if (err < 0) { rtnl_unlock(); - goto out_free_radios; + goto out_free_mon; } err = register_netdevice(hwsim_mon); |