summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaurabh Badhwar <sbsaurabhbadhwar9@gmail.com>2017-01-13 12:59:51 +0530
committerVijay Bellur <vbellur@redhat.com>2017-01-17 12:53:35 -0800
commit7b61434257f68749bfceee481fa505de7f945747 (patch)
treeb1e529c52f8492da03d4539964da206d860af70f
parent3263d1c4f4b7efd1a018c17e1ba4dd9245094f48 (diff)
fuse: Fix a possible resource leak under GF_SOLARIS_HOST_OS
in fuse-helpers.c Change-Id: Ie367a6dec2a0d5848631b19ebbe39ceafa954a60 BUG: 1412918 Signed-off-by: Saurabh Badhwar <sbsaurabhbadhwar9@gmail.com> Reviewed-on: http://review.gluster.org/16395 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index 3e541979dc7..b65e6ebfc7b 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -249,8 +249,10 @@ out:
ngrps = MIN(prcred->pr_ngroups,
FUSE_MAX_AUX_GROUPS);
if (call_stack_alloc_groups (frame->root,
- ngrps) != 0)
+ ngrps) != 0) {
+ fclose (fp);
return;
+ }
}
fclose (fp);
}