(IOHIDManager) Plug another potential leak

This commit is contained in:
twinaphex 2016-05-25 02:35:13 +02:00
parent 8c106eb010
commit 40023833e0

View File

@ -323,8 +323,10 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result,
struct iohidmanager_hid_adapter *adapter = (struct iohidmanager_hid_adapter*)
calloc(1, sizeof(*adapter));
if (!adapter || !hid)
if (!adapter)
return;
if (!hid)
goto error;
adapter->handle = device;