diff --git a/rbutil/ipodpatcher/ipodio-posix.c b/rbutil/ipodpatcher/ipodio-posix.c index 881c09b54f..db8648e70e 100644 --- a/rbutil/ipodpatcher/ipodio-posix.c +++ b/rbutil/ipodpatcher/ipodio-posix.c @@ -167,13 +167,12 @@ int ipod_scsi_inquiry(struct ipod_t* ipod, int page_code, /* set value to match. In case of the Ipod this is "iPodUserClientDevice". */ CFMutableDictionaryRef sub_dict; sub_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, NULL, NULL); + if(sub_dict == NULL) + return -1; CFDictionarySetValue(sub_dict, CFSTR(kIOPropertySCSITaskDeviceCategory), CFSTR("iPodUserClientDevice")); CFDictionarySetValue(match_dict, CFSTR(kIOPropertyMatchKey), sub_dict); - if(sub_dict == NULL) - return -1; - /* get an iterator for searching for the service. */ kern_return_t kr; io_iterator_t iterator = IO_OBJECT_NULL;