Module: wine Branch: master Commit: 78eac8156e93d65cc15c7e7241ec90639bea3d24 URL: http://source.winehq.org/git/wine.git/?a=commit;h=78eac8156e93d65cc15c7e7241...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Sat Jul 12 15:24:36 2014 -0300
psapi/tests: Free buffer on error (valgrind).
---
dlls/psapi/tests/psapi_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index ee7e8bd..62d4f5c 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -228,7 +228,11 @@ static BOOL nt_get_mapped_file_name(HANDLE process, LPVOID addr, LPWSTR name, DW todo_wine ok(!status, "NtQueryVirtualMemory error %x\n", status); /* FIXME: remove once Wine is fixed */ - if (status) return FALSE; + if (status) + { + HeapFree(GetProcessHeap(), 0, buf); + return FALSE; + }
section_name = (MEMORY_SECTION_NAME *)buf; ok(ret_len == section_name->SectionFileName.MaximumLength + sizeof(*section_name), "got %lu, %u\n",