summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.c')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 9bf07bf18b9..234af8041c2 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -58,7 +58,9 @@ __fuse_fd_ctx_check_n_create (xlator_t *this, fd_t *fd)
if (fd_ctx == NULL) {
fd_ctx = GF_CALLOC (1, sizeof (*fd_ctx),
gf_fuse_mt_fd_ctx_t);
-
+ if (!fd_ctx) {
+ goto out;
+ }
ret = __fd_ctx_set (fd, this,
(uint64_t)(unsigned long)fd_ctx);
if (ret < 0) {
@@ -68,7 +70,7 @@ __fuse_fd_ctx_check_n_create (xlator_t *this, fd_t *fd)
fd_ctx = NULL;
}
}
-
+out:
return fd_ctx;
}