summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c6
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index c06da7eec58..9a2d60b9b4c 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4601,8 +4601,10 @@ cleanup_exit:
GF_FREE (fsname);
if (priv) {
GF_FREE (priv->mount_point);
- close (priv->fd);
- close (priv->fuse_dump_fd);
+ if (priv->fd != -1)
+ close (priv->fd);
+ if (priv->fuse_dump_fd != -1)
+ close (priv->fuse_dump_fd);
GF_FREE (priv);
}
if (mnt_args)
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index 452a4819441..fbff1e39a0c 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -392,6 +392,10 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
}
ret = 0;
fail:
+ /* this should not happen as inode_path returns -1 when buf is NULL
+ for sure */
+ if (path && !loc->path)
+ GF_FREE (path);
return ret;
}