Win32: Fix joystick element info memory leak

The array was freed on failure but not on success.

Fixes #1396.
master
Camilla Löwy ago%!(EXTRA string=7 years)
parent f4a304ff03
commit a59315ed6a
  1. 2
      src/win32_joystick.c

@ -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…
Cancel
Save