Don't compare file handles to NULL
Francois Gouget
fgouget at free.fr
Thu Mar 8 09:00:57 CST 2007
On Thu, 8 Mar 2007, Alexandre Julliard wrote:
[...]
> Sure, it's best to avoid closing an invalid handle. We don't throw an
> exception but we do set last error, and this could conceivably break
> something. But the NULL check is not going to cause us to forget to
> close a valid handle, which would be a much worse problem.
Oh, sure.
The exception being RPCRT4_RPCSSOnDemandCall() (and similar code in
rpcss) which was so confused it did not call CloseHandle() at all (as
far as I could see).
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
Linux: It is now safe to turn on your computer.
More information about the wine-devel
mailing list