crypt32: Fix a memory leak querying a message object.

This commit is contained in:
Juan Lang 2009-11-02 10:27:25 -08:00 committed by Alexandre Julliard
parent 9928e2e1c5
commit 7dd75d1181
1 changed files with 4 additions and 2 deletions

View File

@ -599,11 +599,13 @@ static BOOL CRYPT_QueryMessageObject(DWORD dwObjectType, const void *pvObject,
{
if (pdwFormatType)
*pdwFormatType = formatType;
if (phMsg)
*phMsg = msg;
if (phCertStore)
*phCertStore = CertOpenStore(CERT_STORE_PROV_MSG, encodingType, 0,
0, msg);
if (phMsg)
*phMsg = msg;
else
CryptMsgClose(msg);
}
if (blob == &fileBlob)
CryptMemFree(blob->pbData);