dinput: Added some missing free/close in disabled case (Coverity).
This commit is contained in:
parent
791bc1cb93
commit
e10a658c0c
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user