Add NULL check for pmksa cache free_cb() callback
free_cb can be NULL during the pmksa_cache_auth_init() from the modules using libpasn.so. So check it explicitly before dereferencing. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
97b6cc6e58
commit
c860647160
1 changed files with 3 additions and 1 deletions
|
@ -56,7 +56,9 @@ void pmksa_cache_free_entry(struct rsn_pmksa_cache *pmksa,
|
|||
unsigned int hash;
|
||||
|
||||
pmksa->pmksa_count--;
|
||||
pmksa->free_cb(entry, pmksa->ctx);
|
||||
|
||||
if (pmksa->free_cb)
|
||||
pmksa->free_cb(entry, pmksa->ctx);
|
||||
|
||||
/* unlink from hash list */
|
||||
hash = PMKID_HASH(entry->pmkid);
|
||||
|
|
Loading…
Add table
Reference in a new issue