https://bugs.winehq.org/show_bug.cgi?id=36272
--- Comment #20 from Michael Stefaniuc mstefani@winehq.org --- The migration malloc / free won't fix the leaks. The migrations are happening now only because we can do them with the conversion to PE as we can use the malloc and free from the msvcrt DLL. It avoids the need for the heap_alloc / heap_free wrappers; basically less typing for the developers. And provides a sane behaviour for realloc which HeapRealloc lacks.
Also the migrations aren't a pure search and replace either. Some stuff needs to stay with HeapAlloc aka those public API parts e.g. seen in the documentation as "the caller is responsible to HeapFree() the returned object".