shlwapi: Don't bother trying to duplicate nil handle

Bruno Jesus 00cpxxx at gmail.com
Wed Nov 25 02:04:42 CST 2015


On Wed, Nov 25, 2015 at 3:17 PM, Olivier F. R. Dierick
<o.dierick at piezo-forte.be> wrote:
> Fix one of the error leak source that prevents the installer to succeed
> (bug 36838).
>
> The original code did try to duplicate the handle even though it is
> null, and that causes last error to be 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. Returning a null handle
> value is sufficient to indicate that error condition. The SHMapHandle is
> not supposed to set last error on failure.

A test wouldn't hurt, like the attached patch. Maybe to make this more
convincing the test should be sent separate to prove current wine
behavior is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-shlwapi-tests-Test-NULL-handle-duplication-in-SHMapH.patch
Type: text/x-diff
Size: 1102 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20151125/509c2fae/attachment.patch>


More information about the wine-devel mailing list