diff options
author | Jouni Malinen <j@w1.fi> | 2012-02-19 14:28:02 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-02-19 14:28:02 +0200 |
commit | 1485ec076b8a6234e3be813b69ece81c84c389fd (patch) | |
tree | 93898735f0439f4f423ad8c7c98cf3969cc3d9fb | |
parent | d8e59feab244f109862c15fb8029e96d998c92a5 (diff) | |
download | external_wpa_supplicant_8_ti-1485ec076b8a6234e3be813b69ece81c84c389fd.zip external_wpa_supplicant_8_ti-1485ec076b8a6234e3be813b69ece81c84c389fd.tar.gz external_wpa_supplicant_8_ti-1485ec076b8a6234e3be813b69ece81c84c389fd.tar.bz2 |
Fix memory leak on error path in bssid_filter setting
Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r-- | wpa_supplicant/ctrl_iface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 9d1afbe..d623e91 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); |