return NULL;
}
- if (pclose (pp) == -1) {
+ if (pclose (pp) != 0) {
warning (g, "pclose: %m");
return NULL;
}
/* Releases the lock on checksum. */
if (close (fd) == -1) {
perrorf (g, "close");
+ /* Allocated in hard_link_to_cached_appliance above, must be
+ * freed along this error path.
+ */
+ free (*kernel);
+ free (*initrd);
+ free (*appliance);
return -1;
}
/* Releases the lock on checksum. */
if (close (fd) == -1) {
perrorf (g, "close");
+ /* Allocated in hard_link_to_cached_appliance above, must be
+ * freed along this error path.
+ */
+ free (*kernel);
+ free (*initrd);
+ free (*appliance);
return -1;
}