guestfs___print_timestamped_message (g, "run febootstrap-supermin-helper");
int r = run_supermin_helper (g, supermin_path, tmpcd, len);
- if (r == -1)
+ if (r == -1) {
+ guestfs___remove_tmpdir (tmpcd);
return -1;
+ }
if (g->verbose)
guestfs___print_timestamped_message (g, "finished building supermin appliance");
int fd = open (filename, O_WRONLY|O_CREAT, 0755);
if (fd == -1) {
perrorf (g, "open: %s", filename);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
struct flock fl;
goto again;
perrorf (g, "fcntl: F_SETLKW: %s", filename);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
if (ftruncate (fd, clen) == -1) {
perrorf (g, "ftruncate: %s", filename);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
if (rr == -1) {
perrorf (g, "write: %s", filename);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
if ((size_t) rr != clen) {
error (g, "partial write: %s", filename);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
if (rename (filename, filename2) == -1) {
perrorf (g, "rename: %s %s", filename, filename2);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
if (rename (filename, filename2) == -1) {
perrorf (g, "rename: %s %s", filename, filename2);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}
if (rename (filename, filename2) == -1) {
perrorf (g, "rename: %s %s", filename, filename2);
close (fd);
+ guestfs___remove_tmpdir (tmpcd);
return -1;
}