diff options
-rw-r--r-- | lib/libfuse/fuse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libfuse/fuse.c b/lib/libfuse/fuse.c index 7090239629a..d1ac5b89e8e 100644 --- a/lib/libfuse/fuse.c +++ b/lib/libfuse/fuse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse.c,v 1.9 2013/08/10 00:30:43 syl Exp $ */ +/* $OpenBSD: fuse.c,v 1.10 2013/08/10 09:51:50 jca Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -111,7 +111,7 @@ fuse_mount(const char *dir, unused struct fuse_args *args) if (fc->dir == NULL) goto bad; - if ((fc->fd = open("/dev/fuse0", O_RDWR)) < 0) { + if ((fc->fd = open("/dev/fuse0", O_RDWR)) == -1) { perror(__func__); goto bad; } @@ -135,10 +135,10 @@ fuse_mount(const char *dir, unused struct fuse_args *args) return (fc); bad: - if (fc->fd > 0) + if (fc->fd != -1) close(fc->fd); - if (fc->dir != NULL) - free(fc->dir); + free(fc->dir); + free(fc); return (NULL); } |