Don't compare file handles to NULL
mstefani at redhat.com
Thu Mar 8 07:48:34 CST 2007
Alexandre Julliard wrote:
> Francois Gouget <fgouget at free.fr> writes:
>>These are not false positives. Any file handle that is not
>>INVALID_HANDLE_VALUE must be closed with CloseHandle(). So these checks
>>should be against INVALID_HANDLE_VALUE, not NULL. In fact they may
>>possibly be removed altogether.
> Note that a valid file handle will never be NULL, so while these
> checks are wrong in theory, in practice it makes no difference.
Well, in one of the found cases (one of the RPCRT) the code was setting
the file handle manualy to NULL...
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: mstefani at redhat.com
Hauptstaetterstr. 58 http://www.redhat.de/
More information about the wine-devel