Module: wine Branch: refs/heads/master Commit: d6201e23750c49e90791a62667d64ccafd4da5dd URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d6201e23750c49e90791a626...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Mon Feb 27 22:24:59 2006 +0100
crypt32: Don't access a blob after freeing it.
---
dlls/crypt32/oid.c | 2 +- dlls/crypt32/store.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index d823649..1555bb2 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 348bca8..444d9c3 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -534,8 +534,8 @@ static BOOL WINAPI CRYPT_MemDeleteCert(H * protected. */ list_remove(&cert->entry); - ret = CertFreeCertificateContext((PCCERT_CONTEXT)cert); cert->entry.prev = cert->entry.next = &store->certs; + ret = CertFreeCertificateContext((PCCERT_CONTEXT)cert); break; } }