diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 7ca292530..3e9921553 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -1553,7 +1553,8 @@ int hostapd_setup_wpa(struct hostapd_data *hapd) return -1; } - hapd->ptksa = ptksa_cache_init(); + if (!hapd->ptksa) + hapd->ptksa = ptksa_cache_init(); if (!hapd->ptksa) { wpa_printf(MSG_ERROR, "Failed to allocate PTKSA cache"); return -1;