ap: free passphrase on error

This commit is contained in:
James Prestwood 2021-02-08 12:19:57 -08:00 committed by Denis Kenzior
parent 17ba7e415b
commit 0ae3e1c59d
1 changed files with 1 additions and 0 deletions

View File

@ -2568,6 +2568,7 @@ static int ap_load_profile_and_dhcp(struct ap_state *ap, bool *wait_dhcp)
if (strlen(passphrase) > 63) {
l_error("[Security].Passphrase must not exceed "
"63 characters");
l_free(passphrase);
return -EINVAL;
}