From e96a52cdc1b5f730399470480df18139b69a341a Mon Sep 17 00:00:00 2001 From: Olia Kremmyda Date: Sun, 22 May 2016 23:38:19 +0300 Subject: 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 > Reviewed-on: http://review.gluster.org/14464 > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Tested-by: Gluster Build System > Smoke: Gluster Build System > Reviewed-by: Jeff Darcy Bug: 1339137 Change-Id: I71b246ebec41a23702920c6b54cbc18e95342232 Signed-off-by: Olia Kremmyda Reviewed-on: http://review.gluster.org/14465 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Niels de Vos Smoke: Gluster Build System --- xlators/mount/fuse/src/fuse-bridge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators') 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; -- cgit