From: Jouni Malinen Date: Sun, 19 Feb 2012 12:28:02 +0000 (+0200) Subject: Fix memory leak on error path in bssid_filter setting X-Git-Tag: hostap_2_0~851 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1485ec076b8a6234e3be813b69ece81c84c389fd;p=thirdparty%2Fhostap.git Fix memory leak on error path in bssid_filter setting Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 9d1afbe4b..d623e91b9 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -124,8 +124,10 @@ static int set_bssid_filter(struct wpa_supplicant *wpa_s, char *val) while (pos) { if (*pos == '\0') break; - if (hwaddr_aton(pos, addr)) + if (hwaddr_aton(pos, addr)) { + os_free(filter); return -1; + } n = os_realloc(filter, (count + 1) * ETH_ALEN); if (n == NULL) { os_free(filter);