mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +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:
parent
630c2c2a08
commit
95574e4538
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user