Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// Generate a random path if none is set
if (!path) {
path = pakfire_mkdtemp(tempdir);
- if (!path)
+ if (!path) {
+ r = 1;
goto ERROR;
+ }
// Mount this as tmpfs
p->mount_tmpfs = !pakfire_has_flag(p, PAKFIRE_FLAGS_DISABLE_RAMDISK);
// Make path for private files
char private_dir[PATH_MAX];
r = pakfire_make_path(p, private_dir, PAKFIRE_PRIVATE_DIR);
- if (r < 0)
+ if (r < 0) {
+ r = 1;
goto ERROR;
+ }
// Make sure that our private directory exists
r = pakfire_mkdir(private_dir, 0);