shlwapi: SHFreeShared returns TRUE when passed NULL handle.

Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Olivier F. R. Dierick 2015-12-02 00:39:12 +01:00 committed by Alexandre Julliard
parent 454168ace6
commit de0d8719d2
1 changed files with 3 additions and 0 deletions

View File

@ -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);