msvcrt: move error condition before memory allocation (found by Smatch).

Lionel_Debroux lionel_debroux at yahoo.fr
Mon Sep 24 07:05:19 CDT 2007


_fullpath leaks some heap memory in an error paths. Found in Michael
Stefaniuc's list of Wine potential bugs detected by Smatch.
Fixed by moving the error treatment before the allocation, since the
error treatment doesn't fire up if there was a memory allocation (due to
size = MAX_PATH; assignment).

2007-09-24  Lionel Debroux <lionel_debroux at yahoo.fr>
       * dlls/msvcrt/dir.c:
       msvcrt: move error condition before memory allocation (found by
Smatch).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-msvcrt-move-error-condition-before-memory-allocatio.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070924/3bf47aa2/attachment.bin 


More information about the wine-patches mailing list