Browse Source

Free the correct variable.

Ryan C. Gordon 11 năm trước cách đây
mục cha
commit
96f09df730
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/joystick/darwin/SDL_sysjoystick.c

+ 1 - 1
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) {