kernel32: fix memory leak (found by Smatch).

Lionel Debroux lionel_debroux at
Fri Oct 12 01:15:01 CDT 2007

Is there anything wrong with this patch ? I think this one is a real memory leak.

"WaitNamedPipeW" in dlls/kernel32/sync.c gets flagged by Michael Stefaniuc's 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>
        * dlls/kernel32/sync.c:
        kernel32: fix memory leak (found by Smatch).

Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
-------------- 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: 1895806501-0001-kernel32-fix-memory-leak-found-by-Smatch.patch
Url : 

More information about the wine-devel mailing list