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

handshake: unref erp_cache when handshake is freed

This makes the erp_cache ownership more consisten rather than
relying on the ERP state to free the cache.
This commit is contained in:
James Prestwood 2021-08-03 14:40:44 -07:00 committed by Denis Kenzior
parent 630c2c2a08
commit 95574e4538

View File

@ -41,6 +41,7 @@
#include "src/ie.h"
#include "src/util.h"
#include "src/handshake.h"
#include "src/erp.h"
static inline unsigned int n_ecc_groups()
{
@ -106,6 +107,9 @@ void handshake_state_free(struct handshake_state *s)
l_free(s->mde);
l_free(s->fte);
if (s->erp_cache)
erp_cache_put(s->erp_cache);
if (s->passphrase) {
explicit_bzero(s->passphrase, strlen(s->passphrase));
l_free(s->passphrase);