|
dataBuf = (void*)malloc(return_size); |
This function (ApplyMonofilePatchMemoryToMemoryEx) returns a pointer which has been allocated by a statically linked malloc function. This should not be done, because the callee has no way to free this memory.
For Release builds one can simply call Win32 HeapFree, since CRT free is just a wrapper around that function. This does not work in Debug builds however, since free uses the CRT heap. Anyways, this should probably just be done with DfsMalloc and DfsFree for consistency.
smartversion/src/lib/helper/decompress/ExtractHelper.c
Line 869 in 8105535
This function (ApplyMonofilePatchMemoryToMemoryEx) returns a pointer which has been allocated by a statically linked malloc function. This should not be done, because the callee has no way to free this memory.
For Release builds one can simply call Win32 HeapFree, since CRT free is just a wrapper around that function. This does not work in Debug builds however, since free uses the CRT heap. Anyways, this should probably just be done with DfsMalloc and DfsFree for consistency.