diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index d9ab22985fe..8de96c8c764 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -607,6 +607,11 @@ static BOOL CRYPT_AcquirePrivateKeyFromProvInfo(PCCERT_CONTEXT pCert, CERT_KEY_PROV_INFO_PROP_ID, info, &size); allocated = TRUE; } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } } else SetLastError(CRYPT_E_NO_KEY_PROPERTY);