hostapd: fix a segfault in the error path of the nl80211 bss interface add function

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19496 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2010-02-02 02:51:06 +00:00
parent 27f50999c9
commit 1374dbd04d
1 changed files with 6 additions and 2 deletions

View File

@ -903,8 +903,12 @@
return -1; return -1;
} }
@@ -4484,9 +4483,12 @@ static int wpa_driver_nl80211_if_add(con @@ -4481,12 +4480,15 @@ static int wpa_driver_nl80211_if_add(con
os_free(bss); if (type == WPA_IF_AP_BSS) {
if (linux_set_iface_flags(drv->ioctl_sock, ifname, 1)) {
nl80211_remove_iface(drv, ifidx);
- os_free(bss);
+ os_free(new_bss);
return -1; return -1;
} }
- bss->ifindex = ifidx; - bss->ifindex = ifidx;