aboutsummaryrefslogtreecommitdiffstats
path: root/src/dumm/cowfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dumm/cowfs.c')
-rw-r--r--src/dumm/cowfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dumm/cowfs.c b/src/dumm/cowfs.c
index 4c16c7c5d..f7984635a 100644
--- a/src/dumm/cowfs.c
+++ b/src/dumm/cowfs.c
@@ -858,13 +858,15 @@ cowfs_t *cowfs_create(char *master, char *host, char *mount)
{
DBG1("failed to open master filesystem '%s'", master);
free(this);
+ return NULL;
}
this->host_fd = open(host, O_RDONLY | O_DIRECTORY);
- if (this->master_fd < 0)
+ if (this->host_fd < 0)
{
DBG1("failed to open host filesystem '%s'", host);
close(this->master_fd);
free(this);
+ return NULL;
}
this->over_fd = -1;