mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 23:33:16 +01: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:
@@ -260,6 +260,8 @@ static void closeJoystick(_GLFWjoystick* js)
|
||||
IDirectInputDevice8_Release(js->win32.device);
|
||||
}
|
||||
|
||||
free(js->win32.objects);
|
||||
|
||||
_glfwFreeJoystick(js);
|
||||
_glfwInputJoystick(js, GLFW_DISCONNECTED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user