Fix memory leak on EAPOL Authenticator error path

wlan0: RADIUS No authentication server configured
MEMLEAK[0x999feb8]: len 1040
WPA_TRACE: memleak - START
[3]: ./hostapd(radius_msg_new+0x33) [0x8074f43]
     radius_msg_new() ../src/radius/radius.c:117
[4]: ./hostapd() [0x806095e]
     ieee802_1x_encapsulate_radius() ../src/ap/ieee802_1x.c:439
     ieee802_1x_aaa_send() ../src/ap/ieee802_1x.c:1496

For example, this error occured when I used WPS hostapd without
"eap_server=1" definition in configuration file.
This commit is contained in:
Masashi Honma 2010-11-24 01:42:50 +02:00 committed by Jouni Malinen
parent bbb921daaa
commit dbb6ed7e75
1 changed files with 3 additions and 1 deletions

View File

@ -551,7 +551,9 @@ static void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
} }
} }
radius_client_send(hapd->radius, msg, RADIUS_AUTH, sta->addr); if (radius_client_send(hapd->radius, msg, RADIUS_AUTH, sta->addr) < 0)
goto fail;
return; return;
fail: fail: