Win32: Fix joystick element info memory leak

The array was freed on failure but not on success.

Fixes #1396.
This commit is contained in:
Camilla Löwy 2018-12-13 20:29:50 +01:00
parent f4a304ff03
commit a59315ed6a
1 changed files with 2 additions and 0 deletions

View File

@ -260,6 +260,8 @@ static void closeJoystick(_GLFWjoystick* js)
IDirectInputDevice8_Release(js->win32.device);
}
free(js->win32.objects);
_glfwFreeJoystick(js);
_glfwInputJoystick(js, GLFW_DISCONNECTED);
}