user32: Fix some leaks on error path (Coverity).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 381c4e7b66)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Sven Baars 2019-05-31 11:12:18 +02:00 committed by Michael Stefaniuc
parent 86b5e684a4
commit f41154ce7f
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ static void find_hid_devices(void)
if (!hid_devices)
{
ERR("Failed to allocate memory.\n");
CloseHandle(file);
heap_free(path);
goto done;
}
}