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 e729edb..ae278b3 100644 (file)
@@ -55,6 +55,8 @@ static NSArray *ActionsForElement(IOHIDDeviceRef device, id base) {
         action.cookie = IOHIDElementGetCookie(element);
         [children addObject:action];
     }
+
+    CFRelease(elements);
     return children;
 }