Fix memory leak.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 28 Feb 2013 19:33:46 +0000 (20:33 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 28 Feb 2013 19:33:46 +0000 (20:33 +0100)
Joystick.m

index e729edb987a31ae5ba0ce7da0df439c1c58b7bd1..ae278b30b3094527adaee68d0efa9ba818df55be 100644 (file)
@@ -55,6 +55,8 @@ static NSArray *ActionsForElement(IOHIDDeviceRef device, id base) {
         action.cookie = IOHIDElementGetCookie(element);
         [children addObject:action];
     }
+
+    CFRelease(elements);
     return children;
 }