mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-10-09 10:27:26 +02:00
handshake: use pmksa_cache_free
This commit is contained in:
parent
c52d913f20
commit
7f9ea7640d
@ -1239,7 +1239,7 @@ static struct pmksa *handshake_state_steal_pmksa(struct handshake_state *s)
|
|||||||
s->have_pmksa = false;
|
s->have_pmksa = false;
|
||||||
|
|
||||||
if (l_time_after(now, pmksa->expiration)) {
|
if (l_time_after(now, pmksa->expiration)) {
|
||||||
l_free(pmksa);
|
pmksa_cache_free(pmksa);
|
||||||
pmksa = NULL;
|
pmksa = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1280,7 +1280,7 @@ void handshake_state_cache_pmksa(struct handshake_state *s)
|
|||||||
l_debug("Caching PMKSA for "MAC, MAC_STR(s->aa));
|
l_debug("Caching PMKSA for "MAC, MAC_STR(s->aa));
|
||||||
|
|
||||||
if (L_WARN_ON(pmksa_cache_put(pmksa) < 0))
|
if (L_WARN_ON(pmksa_cache_put(pmksa) < 0))
|
||||||
l_free(pmksa);
|
pmksa_cache_free(pmksa);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool handshake_state_remove_pmksa(struct handshake_state *s)
|
bool handshake_state_remove_pmksa(struct handshake_state *s)
|
||||||
@ -1294,7 +1294,7 @@ bool handshake_state_remove_pmksa(struct handshake_state *s)
|
|||||||
if (!pmksa)
|
if (!pmksa)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
l_free(pmksa);
|
pmksa_cache_free(pmksa);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user