diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index d8236493885..1555bb240db 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -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); } diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 348bca8c674..444d9c35233 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -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; } }