Olivier F. R. Dierick : shlwapi: SHFreeShared returns TRUE when passed NULL handle.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Dec 3 09:56:21 CST 2015


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

Author: Olivier F. R. Dierick <o.dierick at piezo-forte.be>
Date:   Wed Dec  2 00:39:12 2015 +0100

shlwapi: SHFreeShared returns TRUE when passed NULL handle.

Signed-off-by: Olivier F. R. Dierick <o.dierick at piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shlwapi/ordinal.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index 3c8af5c..699fcc6 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -259,6 +259,9 @@ BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
 
   TRACE("(%p %d)\n", hShared, dwProcId);
 
+  if (!hShared)
+    return TRUE;
+
   /* Get a copy of the handle for our process, closing the source handle */
   hClose = SHMapHandle(hShared, dwProcId, GetCurrentProcessId(),
                        FILE_MAP_ALL_ACCESS,DUPLICATE_CLOSE_SOURCE);




More information about the wine-cvs mailing list