Juan Lang : wintrust: Only close a file in SoftpubCleanup if the WINTRUST_DATA contains a WINTRUST_FILE_INFO .

Alexandre Julliard julliard at winehq.org
Wed Nov 4 10:26:24 CST 2009


Module: wine
Branch: master
Commit: f4b359942b263b16f9a4b1a6694a31f83c6774b2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f4b359942b263b16f9a4b1a6694a31f83c6774b2

Author: Juan Lang <juan.lang at gmail.com>
Date:   Tue Nov  3 16:15:32 2009 -0800

wintrust: Only close a file in SoftpubCleanup if the WINTRUST_DATA contains a WINTRUST_FILE_INFO.

---

 dlls/wintrust/softpub.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index 1db4b47..47b76b2 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -1078,7 +1078,8 @@ HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *data)
 
     CryptMsgClose(data->hMsg);
 
-    if (data->fOpenedFile)
+    if (data->fOpenedFile &&
+     data->pWintrustData->dwUnionChoice == WTD_CHOICE_FILE)
         CloseHandle(data->pWintrustData->u.pFile->hFile);
 
     return S_OK;




More information about the wine-cvs mailing list