Commit e10a658c authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

dinput: Added some missing free/close in disabled case (Coverity).

parent 791bc1cb
...@@ -251,7 +251,13 @@ static void find_joydevs(void) ...@@ -251,7 +251,13 @@ static void find_joydevs(void)
else else
joydev.name = joydev.device; joydev.name = joydev.device;
if (device_disabled_registry(joydev.name)) continue; if (device_disabled_registry(joydev.name)) {
close(fd);
HeapFree(GetProcessHeap(), 0, joydev.name);
if (joydev.name != joydev.device)
HeapFree(GetProcessHeap(), 0, joydev.device);
continue;
}
joydev.guid = DInput_Wine_Joystick_Base_GUID; joydev.guid = DInput_Wine_Joystick_Base_GUID;
joydev.guid.Data3 += have_joydevs; joydev.guid.Data3 += have_joydevs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment