RADIUS: Fix possible memory leak when parsing per-STA passphrase
Fix a possible memory leak in decode_tunnel_passwords() if an invalid passphrase is received from the RADIUS server. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
This commit is contained in:
parent
601e55726c
commit
f1863f2b82
1 changed files with 2 additions and 1 deletions
|
@ -457,7 +457,7 @@ static void decode_tunnel_passwords(struct hostapd_data *hapd,
|
|||
|
||||
if (passphraselen < MIN_PASSPHRASE_LEN ||
|
||||
passphraselen > MAX_PASSPHRASE_LEN + 1)
|
||||
continue;
|
||||
goto free_pass;
|
||||
|
||||
/*
|
||||
* passphrase does not contain the NULL termination.
|
||||
|
@ -484,6 +484,7 @@ static void decode_tunnel_passwords(struct hostapd_data *hapd,
|
|||
}
|
||||
skip:
|
||||
os_free(psk);
|
||||
free_pass:
|
||||
os_free(passphrase);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue