Rework change for coverity.
@@ -2831,8 +2831,9 @@ cups_dnssd_get_device(
!strcmp(regtype, "_ipps._tcp") ? "IPPS" : "IPP",
replyDomain));
- if ((device = calloc(sizeof(_cups_dnssd_device_t), 1)) != NULL)
- {
+ if ((device = calloc(sizeof(_cups_dnssd_device_t), 1)) == NULL)
+ return (NULL);
+
device->dest.name = _cupsStrAlloc(name);
device->domain = _cupsStrAlloc(replyDomain);
device->regtype = _cupsStrAlloc(regtype);
@@ -2841,7 +2842,6 @@ cups_dnssd_get_device(
cupsArrayAdd(data->devices, device);
}
- }
/*
* Set the "full name" of this service, which is used for queries...
