From b7c1fbf9f0174d43bff9a9a55437577eb9a3a222 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 28 Aug 2022 17:38:02 -0500 Subject: [PATCH] WGI: Fix a couple of reference leaks --- src/joystick/windows/SDL_windows_gaming_input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/joystick/windows/SDL_windows_gaming_input.c b/src/joystick/windows/SDL_windows_gaming_input.c index cf9e77b6e3..e529b684d9 100644 --- a/src/joystick/windows/SDL_windows_gaming_input.c +++ b/src/joystick/windows/SDL_windows_gaming_input.c @@ -560,9 +560,12 @@ WGI_JoystickInit(void) hr = __FIVectorView_1_Windows__CGaming__CInput__CRawGameController_GetAt(controllers, i, &controller); if (SUCCEEDED(hr) && controller) { IEventHandler_CRawGameControllerVtbl_InvokeAdded(&controller_added, NULL, controller); + __x_ABI_CWindows_CGaming_CInput_CIRawGameController_Release(controller); } } } + + __FIVectorView_1_Windows__CGaming__CInput__CRawGameController_Release(controllers); } }