diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index b38f49665..bdface777 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -461,7 +461,7 @@ CreateHIDDeviceMatchDictionary(const UInt32 page, const UInt32 usage, int *okay) CFRelease(pageNumRef); } if (usageNumRef) { - CFRelease(pageNumRef); + CFRelease(usageNumRef); } if (!retval) {