summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKremmyda, Olia (NSN - GR/Athens) <olympia.kremmyda@nokia.com>2016-05-22 19:04:05 +0300
committerNiels de Vos <ndevos@redhat.com>2016-07-17 14:35:09 -0700
commit338aa4634fe0aa8723349763871b3933b14d54ff (patch)
tree91ac5d035031d56aa6011ca70eb1c8d4a0020190 /xlators
parentc28aca72289c6526abc48d08f669c50e13ef4ab5 (diff)
fuse: unref dict even if fuse_first_lookup fails
In fuse_first_lookup function, "dict_unref (dict)" should be included in the out label, in case create_frame returns an empty pointer the dict to be unreferenced as well. Backport of commit b01fb8d3bb9772d94073aaa52b2d8210ac4fabb8: > Bug: 1338544 > Change-Id: Ifb8a3378aec6521c1aa848f818968b6bfdb72089 > Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> > Reviewed-on: http://review.gluster.org/14464 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Bug: 1339138 Change-Id: I5c26740ecf8e4344a3150e1f9ac9bdcaec22d819 Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> Reviewed-on: http://review.gluster.org/14463 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 01be4ef7902..81fff39c124 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4202,8 +4202,6 @@ fuse_first_lookup (xlator_t *this)
pthread_mutex_unlock (&stub.mutex);
}
- dict_unref (dict);
-
pthread_mutex_destroy (&stub.mutex);
pthread_cond_destroy (&stub.cond);
@@ -4211,6 +4209,7 @@ fuse_first_lookup (xlator_t *this)
STACK_DESTROY (frame->root);
out:
+ dict_unref (dict);
inode_unref(loc.inode);
return ret;