crypt32: Don't free a certificate that hasn't been removed from its store.
authorJuan Lang <juan.lang@gmail.com>
Mon, 10 Aug 2009 17:42:55 +0000 (10:42 -0700)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 11 Aug 2009 10:31:12 +0000 (12:31 +0200)
dlls/crypt32/store.c

index e043315..8acc6f6 100644 (file)
@@ -978,7 +978,8 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
             ret = FALSE;
         else
             ret = hcs->certs.deleteContext(hcs, (void *)pCertContext);
-        CertFreeCertificateContext(pCertContext);
+        if (ret)
+            CertFreeCertificateContext(pCertContext);
     }
     return ret;
 }