summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbutil/ipodpatcher/ipodio-posix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/rbutil/ipodpatcher/ipodio-posix.c b/rbutil/ipodpatcher/ipodio-posix.c
index 881c09b..db8648e 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;