Commit 7e1cff1c authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Release contexts when removing them from the mem store.

parent df39bbba
......@@ -186,7 +186,7 @@ static BOOL CRYPT_MemDeleteCert(PWINECRYPT_CERTSTORE store, void *pCertContext)
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
ContextList_Delete(ms->certs, pCertContext);
return TRUE;
return CertFreeCertificateContext(pCertContext);
}
static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl,
......@@ -227,7 +227,7 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext)
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
ContextList_Delete(ms->crls, pCrlContext);
return TRUE;
return CertFreeCRLContext(pCrlContext);
}
static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl,
......@@ -268,7 +268,7 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext)
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
ContextList_Delete(ms->ctls, pCtlContext);
return TRUE;
return CertFreeCTLContext(pCtlContext);
}
static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
......
......@@ -237,6 +237,7 @@ static void testMemStore(void)
GetLastError());
/* try deleting a copy */
ret = CertDeleteCertificateFromStore(copy);
todo_wine
ok(ret, "CertDeleteCertificateFromStore failed: %08x\n",
GetLastError());
/* check that the store is empty */
......
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