prototype of irdumm - interactive ruby shell for dumm
[strongswan.git] / src / dumm / cowfs.c
index 4c16c7c..f798463 100644 (file)
@@ -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;