Shell32: Check null handles before freeing

Olivier F. R. Dierick o.dierick at piezo-forte.be
Wed Nov 25 01:02:41 CST 2015


Fix one of the error leak source that prevents the installer to succeed
(bug 36838).

The original code did not check if the handles were null before freeing
them. For some reason they happen to be null and last error is set to
ERROR_INVALID_HANDLE. The game installer chokes at some point when the
last error is anything but zero and fails to complete the installation.
Checking if the handles are non-null before freeing them avoids this.
According to MSDN, it is not an error to have null values for those
handles.

Signed-off-by: Olivier F. R. Dierick <o.dierick at piezo-forte.be>
---
 dlls/shell32/changenotify.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
        Olivier F. R. Dierick
        o.dierick at piezo-forte.be
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Check-null-handles-before-freeing.patch
Type: application/mbox
Size: 1012 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20151125/8f2a2b9c/attachment.mbox>


More information about the wine-patches mailing list