mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
cryptnet: Fix memory leaks querying an object.
This commit is contained in:
parent
320407a174
commit
35dbc201ae
@ -1246,20 +1246,24 @@ static BOOL WINAPI CRYPT_CreateAny(LPCSTR pszObjectOid,
|
||||
if (!CertAddCertificateContextToStore(store,
|
||||
context, CERT_STORE_ADD_ALWAYS, NULL))
|
||||
ret = FALSE;
|
||||
CertFreeCertificateContext(context);
|
||||
break;
|
||||
case CERT_QUERY_CONTENT_CRL:
|
||||
if (!CertAddCRLContextToStore(store,
|
||||
context, CERT_STORE_ADD_ALWAYS, NULL))
|
||||
ret = FALSE;
|
||||
CertFreeCRLContext(context);
|
||||
break;
|
||||
case CERT_QUERY_CONTENT_CTL:
|
||||
if (!CertAddCTLContextToStore(store,
|
||||
context, CERT_STORE_ADD_ALWAYS, NULL))
|
||||
ret = FALSE;
|
||||
CertFreeCTLContext(context);
|
||||
break;
|
||||
default:
|
||||
CertAddStoreToCollection(store, contextStore, 0, 0);
|
||||
}
|
||||
CertCloseStore(contextStore, 0);
|
||||
}
|
||||
else
|
||||
ret = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user