kernel32: fix memory leak (found by Smatch).

Lionel_Debroux lionel_debroux at yahoo.fr
Sat Oct 6 14:01:28 CDT 2007


"WaitNamedPipeW" in dlls/kernel32/sync.c gets flagged by Michael
Stefaniuc's unfree-wine.pl script for leaking "pipe_wait".

pipe_wait isn't used anywhere between its allocation and the memory leak
in the error path. nt_name.Length, which is used for computing
sz_pipe_wait isn't modified either in those lines.
Therefore, I fixed the leak in the error path by moving the allocation
later in the program.

2007-10-06  Lionel Debroux <lionel_debroux at yahoo.fr>
        * dlls/kernel32/sync.c:
        kernel32: fix memory leak (found by Smatch).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-kernel32-fix-memory-leak-found-by-Smatch.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071006/af43bbdc/attachment.patch 


More information about the wine-patches mailing list