diff options
Diffstat (limited to 'src/mfs_vnops.c')
-rwxr-xr-x | src/mfs_vnops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mfs_vnops.c b/src/mfs_vnops.c index 07faf44..c97bb35 100755 --- a/src/mfs_vnops.c +++ b/src/mfs_vnops.c @@ -144,6 +144,7 @@ static int mfs_open (const char *path, struct fuse_file_info *fi) if (status != 0) return status; fd = open(realpath, O_RDONLY); + free(realpath); if (fd < 0) return (-errno); fi->fh = (uint64_t)fd; @@ -260,7 +261,7 @@ static int mfs_release(const char *path, struct fuse_file_info *fi) } fd = (int)fi->fh; - if (fd >= 0) + if (fd > 0) close(fd); return (0); |