3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-27 02:32:52 +01:00

network: free EAP_CACHE_NEVER secret types

When freeing a network secrets any secrets labeled with CACHE_NEVER
would get removed from the secret queue but never actually freed.
This commit is contained in:
James Prestwood 2018-09-19 12:31:59 -07:00 committed by Denis Kenzior
parent 74b8b6d65c
commit 996a18e934

View File

@ -109,7 +109,12 @@ static bool network_secret_check_cacheable(void *data, void *user_data)
{
struct eap_secret_info *secret = data;
return secret->cache_policy == EAP_CACHE_NEVER;
if (secret->cache_policy == EAP_CACHE_NEVER) {
eap_secret_info_free(secret);
return true;
}
return false;
}
void network_connected(struct network *network)