mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Win32: Fix joystick element info memory leak
The array was freed on failure but not on success. Fixes #1396.
This commit is contained in:
parent
f4a304ff03
commit
a59315ed6a
@ -260,6 +260,8 @@ static void closeJoystick(_GLFWjoystick* js)
|
||||
IDirectInputDevice8_Release(js->win32.device);
|
||||
}
|
||||
|
||||
free(js->win32.objects);
|
||||
|
||||
_glfwFreeJoystick(js);
|
||||
_glfwInputJoystick(js, GLFW_DISCONNECTED);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user