psapi/tests: Free buffer on error (valgrind).

This commit is contained in:
Bruno Jesus 2014-07-12 15:24:36 -03:00 committed by Alexandre Julliard
parent 1242417d13
commit 78eac8156e
1 changed files with 5 additions and 1 deletions

View File

@ -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",