From: Kyeyoon Park Date: Tue, 29 Oct 2013 14:32:23 +0000 (+0200) Subject: hostapd: Fix error path in hostapd_add_iface() X-Git-Tag: hostap_2_1~698 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33b0b330cea7986c36e9ca801f1718a69dd2d2b7;p=thirdparty%2Fhostap.git hostapd: Fix error path in hostapd_add_iface() Incorrect count variable was used in freeing up the BSS data. Signed-hostap: Jouni Malinen --- diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 26b3e89cd..48cf5a093 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -1406,7 +1406,11 @@ fail: if (conf) hostapd_config_free(conf); if (hapd_iface) { - os_free(hapd_iface->bss[interfaces->count]); + if (hapd_iface->bss) { + for (i = 0; i < hapd_iface->num_bss; i++) + os_free(hapd_iface->bss[i]); + os_free(hapd_iface->bss); + } os_free(hapd_iface); } return -1;