[PATCH] JanitorialProjects/ReplaceMalloc: remove malloc and free from dlls folder

Yegor Yefremov yegorslists at googlemail.com
Thu Dec 30 06:02:33 CST 2010


Hello,

it's my first contribution to wine, so I wanted to start with some
simple task. After fixing the files mentioned in the attached patch,
following files in dlls folder still contain malloc/free calls:

dlls/ntdll/server.c:            if (!(tmp_dir = malloc( p + 1 -
config_dir ))) fatal_error( "out of memory\n" );
dlls/msvcrt/heap.c: *                  malloc (MSVCRT.@)
dlls/msvcrt/tests/printf.c:        str = malloc(1024);
dlls/msvcrt/tests/printf.c:        str = malloc(1024);
dlls/msvcrt/tests/heap.c:       mem1 = malloc(size1);
dlls/msvcrt/tests/heap.c:       mem1 = malloc(size1);
dlls/msvcrt/tests/heap.c:    mem = malloc(0);
dlls/msvcrt/tests/file.c:    buffer = malloc( len * sizeof(WCHAR) );
dlls/msvcrt/tests/cpp.c: * or at program exit malloc() checking if
these methods haven't been

As far as I understand those files test the core functionality and
should use malloc. If this is so, then malloc/free replacement for
dlls is complete.

The source code could be compiled without problems after applying the patch.

I'm behind a firewall and couldn't clone the repository even via http
(for some other projects it is functioning). That's why my patch was
made with quilt.

Best regards,
Yegor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: malloc-replace.patch
Type: application/octet-stream
Size: 1389 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20101230/1ddac344/attachment.obj>


More information about the wine-devel mailing list