From: Jouni Malinen Date: Sun, 25 Nov 2012 17:45:54 +0000 (+0200) Subject: Remove unnecessary PMKSA cache list modification X-Git-Tag: hostap_2_0~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7593d35c1db04756bb74b5b9a2491eb1bca9b65;p=thirdparty%2Fhostap.git Remove unnecessary PMKSA cache list modification pmksa_cache_free_entry() takes care of updated the list head pointer (pmksa->pmksa), so no need to do this change in the caller. Signed-hostap: Jouni Malinen --- diff --git a/src/ap/pmksa_cache_auth.c b/src/ap/pmksa_cache_auth.c index ba2c033aa..3a9cc7b4e 100644 --- a/src/ap/pmksa_cache_auth.c +++ b/src/ap/pmksa_cache_auth.c @@ -95,11 +95,9 @@ static void pmksa_cache_expire(void *eloop_ctx, void *timeout_ctx) os_get_time(&now); while (pmksa->pmksa && pmksa->pmksa->expiration <= now.sec) { - struct rsn_pmksa_cache_entry *entry = pmksa->pmksa; - pmksa->pmksa = entry->next; wpa_printf(MSG_DEBUG, "RSN: expired PMKSA cache entry for " - MACSTR, MAC2STR(entry->spa)); - pmksa_cache_free_entry(pmksa, entry); + MACSTR, MAC2STR(pmksa->pmksa->spa)); + pmksa_cache_free_entry(pmksa, pmksa->pmksa); } pmksa_cache_set_expiration(pmksa);