crypt32: Don't access a blob after freeing it.

This commit is contained in:
Eric Pouech 2006-02-27 22:24:59 +01:00 committed by Alexandre Julliard
parent 5ca519705d
commit d6201e2375
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,6 @@ static void free_function_sets(void)
list_remove(&setCursor->next);
CryptMemFree(setCursor->name);
CryptMemFree(setCursor);
LIST_FOR_EACH_ENTRY_SAFE(functionCursor, funcNext,
&setCursor->functions, struct OIDFunction, next)
{
@ -93,6 +92,7 @@ static void free_function_sets(void)
CryptMemFree(functionCursor);
}
DeleteCriticalSection(&setCursor->cs);
CryptMemFree(setCursor);
}
DeleteCriticalSection(&funcSetCS);
}

View File

@ -534,8 +534,8 @@ static BOOL WINAPI CRYPT_MemDeleteCert(HCERTSTORE hCertStore,
* protected.
*/
list_remove(&cert->entry);
ret = CertFreeCertificateContext((PCCERT_CONTEXT)cert);
cert->entry.prev = cert->entry.next = &store->certs;
ret = CertFreeCertificateContext((PCCERT_CONTEXT)cert);
break;
}
}