From: Jouni Malinen Date: Mon, 5 Jan 2015 23:39:27 +0000 (+0200) Subject: Fix memory leak on hostapd BSS addition error path X-Git-Tag: hostap_2_4~523 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e10422c025a26dcf4ba96eb819d0f69bc69ef2d2;p=thirdparty%2Fhostap.git Fix memory leak on hostapd BSS addition error path The per-BSS configuration information needs to be freed if hostapd fails to add a new interface for a BSS added with "ADD bss_config=..." command. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 04a0b69db..b4a6a964d 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -1976,6 +1976,8 @@ int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf) hapd_iface->num_bss--; wpa_printf(MSG_DEBUG, "%s: free hapd %p %s", __func__, hapd, hapd->conf->iface); + hostapd_config_free_bss(hapd->conf); + hapd->conf = NULL; os_free(hapd); return -1; }