SAE: Fix resource leak on reading a separate password file
The file needs to be closed on all paths before exiting from the
function.
Fixes: e748e50c62
("SAE passwords from a separate file")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
348c047afd
commit
c03377cf27
1 changed files with 2 additions and 0 deletions
|
@ -2360,10 +2360,12 @@ static int parse_sae_password_file(struct hostapd_bss_config *bss,
|
|||
wpa_printf(MSG_ERROR,
|
||||
"Invalid SAE password at line %d in '%s'",
|
||||
line, fname);
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue