Juan Lang : crypt32: Fix a memory leak querying a message object.
Alexandre Julliard
julliard at winehq.org
Tue Nov 3 15:37:19 CST 2009
Module: wine
Branch: master
Commit: 7dd75d1181ba5038d9f3b0f40e669b7541435315
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7dd75d1181ba5038d9f3b0f40e669b7541435315
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Nov 2 10:27:25 2009 -0800
crypt32: Fix a memory leak querying a message object.
---
dlls/crypt32/object.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/object.c b/dlls/crypt32/object.c
index c337784..3d18c50 100644
--- a/dlls/crypt32/object.c
+++ b/dlls/crypt32/object.c
@@ -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);
More information about the wine-cvs
mailing list