network: free psk on error

This commit is contained in:
James Prestwood 2021-02-08 14:09:11 -08:00 committed by Denis Kenzior
parent 0854592cc6
commit 6930987aa6
1 changed files with 2 additions and 0 deletions

View File

@ -399,6 +399,8 @@ static int network_load_psk(struct network *network, bool need_passphrase)
return 0;
}
l_free(psk);
path = storage_get_network_file_path(security, ssid);
l_error("%s: invalid PreSharedKey format", path);
l_free(path);