Fix memory leaks on radius_client_send error paths
In case this function returns an error, the RADIUS message needs to freed in the caller. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8c6f80e023
commit
ca8e039fec
4 changed files with 16 additions and 9 deletions
|
@ -278,7 +278,9 @@ static void ieee802_1x_encapsulate_radius(struct eapol_test_data *e,
|
|||
}
|
||||
}
|
||||
|
||||
radius_client_send(e->radius, msg, RADIUS_AUTH, e->wpa_s->own_addr);
|
||||
if (radius_client_send(e->radius, msg, RADIUS_AUTH, e->wpa_s->own_addr)
|
||||
< 0)
|
||||
goto fail;
|
||||
return;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue