diff options
Diffstat (limited to 'arch/sandbox/os/common.c')
-rw-r--r-- | arch/sandbox/os/common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c index f6b352f2d6..4eb6d37fff 100644 --- a/arch/sandbox/os/common.c +++ b/arch/sandbox/os/common.c @@ -321,7 +321,7 @@ int linux_open_hostfile(struct hf_info *hf) { char *buf = NULL; struct stat s; - int fd; + int fd = -1; printf("add %s %sbacked by file %s%s\n", hf->devname, hf->filename ? "" : "initially un", hf->filename ?: "", @@ -408,7 +408,7 @@ int linux_open_hostfile(struct hf_info *hf) return 0; err_out: - if (fd > 0) + if (fd >= 0) close(fd); free(buf); return -1; |