EAP-GPSK server: Fix memory freeing on error path
Allocated struct wpabuf was freed with incorrect freeing function. Fix this by using the appropriate function. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
94758682b7
commit
a3be79a142
1 changed files with 2 additions and 2 deletions
|
@ -181,7 +181,7 @@ static struct wpabuf * eap_gpsk_build_gpsk_3(struct eap_sm *sm,
|
||||||
if (eap_gpsk_compute_mic(data->sk, data->sk_len, data->vendor,
|
if (eap_gpsk_compute_mic(data->sk, data->sk_len, data->vendor,
|
||||||
data->specifier, start, pos - start, pos) < 0)
|
data->specifier, start, pos - start, pos) < 0)
|
||||||
{
|
{
|
||||||
os_free(req);
|
wpabuf_free(req);
|
||||||
eap_gpsk_state(data, FAILURE);
|
eap_gpsk_state(data, FAILURE);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -379,7 +379,7 @@ static void eap_gpsk_process_gpsk_2(struct eap_sm *sm,
|
||||||
data->specifier = WPA_GET_BE16(csuite->specifier);
|
data->specifier = WPA_GET_BE16(csuite->specifier);
|
||||||
wpa_printf(MSG_DEBUG, "EAP-GPSK: CSuite_Sel %d:%d",
|
wpa_printf(MSG_DEBUG, "EAP-GPSK: CSuite_Sel %d:%d",
|
||||||
data->vendor, data->specifier);
|
data->vendor, data->specifier);
|
||||||
pos += sizeof(*csuite);
|
pos += sizeof(*csuite);
|
||||||
|
|
||||||
if (end - pos < 2) {
|
if (end - pos < 2) {
|
||||||
wpa_printf(MSG_DEBUG, "EAP-GPSK: Too short message for "
|
wpa_printf(MSG_DEBUG, "EAP-GPSK: Too short message for "
|
||||||
|
|
Loading…
Add table
Reference in a new issue