Fix potential memory leak with identity/radius_cui
ieee802_11_set_radius_info() might be called with a STA entry that has already stored identity and/or radius_cui information, so make sure the old values get freed before being replaced by the new ones. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
473e51762d
commit
17a8a9893f
1 changed files with 3 additions and 0 deletions
|
@ -1648,8 +1648,11 @@ ieee802_11_set_radius_info(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
sta->psk = NULL;
|
sta->psk = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os_free(sta->identity);
|
||||||
sta->identity = *identity;
|
sta->identity = *identity;
|
||||||
*identity = NULL;
|
*identity = NULL;
|
||||||
|
|
||||||
|
os_free(sta->radius_cui);
|
||||||
sta->radius_cui = *radius_cui;
|
sta->radius_cui = *radius_cui;
|
||||||
*radius_cui = NULL;
|
*radius_cui = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue