Fix memory leak.
[enjoyable.git] / 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;
 }