Commit d6201e23 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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

parent 5ca51970
...@@ -85,7 +85,6 @@ static void free_function_sets(void) ...@@ -85,7 +85,6 @@ static void free_function_sets(void)
list_remove(&setCursor->next); list_remove(&setCursor->next);
CryptMemFree(setCursor->name); CryptMemFree(setCursor->name);
CryptMemFree(setCursor);
LIST_FOR_EACH_ENTRY_SAFE(functionCursor, funcNext, LIST_FOR_EACH_ENTRY_SAFE(functionCursor, funcNext,
&setCursor->functions, struct OIDFunction, next) &setCursor->functions, struct OIDFunction, next)
{ {
...@@ -93,6 +92,7 @@ static void free_function_sets(void) ...@@ -93,6 +92,7 @@ static void free_function_sets(void)
CryptMemFree(functionCursor); CryptMemFree(functionCursor);
} }
DeleteCriticalSection(&setCursor->cs); DeleteCriticalSection(&setCursor->cs);
CryptMemFree(setCursor);
} }
DeleteCriticalSection(&funcSetCS); DeleteCriticalSection(&funcSetCS);
} }
......
...@@ -534,8 +534,8 @@ static BOOL WINAPI CRYPT_MemDeleteCert(HCERTSTORE hCertStore, ...@@ -534,8 +534,8 @@ static BOOL WINAPI CRYPT_MemDeleteCert(HCERTSTORE hCertStore,
* protected. * protected.
*/ */
list_remove(&cert->entry); list_remove(&cert->entry);
ret = CertFreeCertificateContext((PCCERT_CONTEXT)cert);
cert->entry.prev = cert->entry.next = &store->certs; cert->entry.prev = cert->entry.next = &store->certs;
ret = CertFreeCertificateContext((PCCERT_CONTEXT)cert);
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment