summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlia Kremmyda <olympia.kremmyda@nokia.com>2016-05-22 23:38:19 +0300
committerNiels de Vos <ndevos@redhat.com>2016-05-24 01:58:05 -0700
commite96a52cdc1b5f730399470480df18139b69a341a (patch)
tree233db7c8ba62c992559762aaf64fae8ea2fc55cf
parent8d03c3a8caf292d1b509f7fe9b4c7c4da4dfb504 (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: 1339137 Change-Id: I71b246ebec41a23702920c6b54cbc18e95342232 Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> Reviewed-on: http://review.gluster.org/14465 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
-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 c8e7c35ce17..eead33fbd55 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4272,8 +4272,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);
@@ -4281,6 +4279,7 @@ fuse_first_lookup (xlator_t *this)
STACK_DESTROY (frame->root);
out:
+ dict_unref (dict);
inode_unref(loc.inode);
return ret;