Fix memory leak on parsing multiple network block eap entries

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
This commit is contained in:
Jouni Malinen 2012-03-04 16:13:00 +02:00
parent 7f41c92bd6
commit bb8b1bb0fc

View file

@ -1110,6 +1110,7 @@ static int wpa_config_parse_eap(const struct parse_data *data,
wpa_hexdump(MSG_MSGDUMP, "eap methods", wpa_hexdump(MSG_MSGDUMP, "eap methods",
(u8 *) methods, num_methods * sizeof(*methods)); (u8 *) methods, num_methods * sizeof(*methods));
os_free(ssid->eap.eap_methods);
ssid->eap.eap_methods = methods; ssid->eap.eap_methods = methods;
return errors ? -1 : 0; return errors ? -1 : 0;
} }