Commit f329de4d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

crypt32: Always return TRUE from CertFreeCertificateContext.

parent 1c049e50
...@@ -370,13 +370,11 @@ PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT pCertContex ...@@ -370,13 +370,11 @@ PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT pCertContex
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext) BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
{ {
BOOL ret = TRUE;
TRACE("(%p)\n", pCertContext); TRACE("(%p)\n", pCertContext);
if (pCertContext) if (pCertContext)
ret = Context_Release(&cert_from_ptr(pCertContext)->base); Context_Release(&cert_from_ptr(pCertContext)->base);
return ret; return TRUE;
} }
DWORD WINAPI CertEnumCertificateContextProperties(PCCERT_CONTEXT pCertContext, DWORD WINAPI CertEnumCertificateContextProperties(PCCERT_CONTEXT pCertContext,
......
...@@ -725,7 +725,8 @@ static void testDupCert(void) ...@@ -725,7 +725,8 @@ static void testDupCert(void)
dupContext = CertDuplicateCertificateContext(context); dupContext = CertDuplicateCertificateContext(context);
ok(dupContext == context, "context != dupContext\n"); ok(dupContext == context, "context != dupContext\n");
CertFreeCertificateContext(dupContext); ret = CertFreeCertificateContext(dupContext);
ok(ret, "CertFreeCertificateContext failed\n");
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL);
ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError());
...@@ -760,7 +761,8 @@ static void testDupCert(void) ...@@ -760,7 +761,8 @@ static void testDupCert(void)
ok(context2->hCertStore == context->hCertStore, "Unexpected hCertStore\n"); ok(context2->hCertStore == context->hCertStore, "Unexpected hCertStore\n");
CertFreeCertificateContext(context2); CertFreeCertificateContext(context2);
CertFreeCertificateContext(context); ret = CertFreeCertificateContext(context);
ok(ret, "CertFreeCertificateContext failed\n");
CertCloseStore(store, 0); CertCloseStore(store, 0);
CertCloseStore(store2, 0); CertCloseStore(store2, 0);
...@@ -768,6 +770,9 @@ static void testDupCert(void) ...@@ -768,6 +770,9 @@ static void testDupCert(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
context = CertDuplicateCertificateContext(NULL); context = CertDuplicateCertificateContext(NULL);
ok(context == NULL, "Expected context to be NULL\n"); ok(context == NULL, "Expected context to be NULL\n");
ret = CertFreeCertificateContext(NULL);
ok(ret, "CertFreeCertificateContext failed\n");
} }
static void testLinkCert(void) static void testLinkCert(void)
......
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