summaryrefslogtreecommitdiffstats
path: root/xlators/features/barrier
diff options
context:
space:
mode:
authorVarsha Rao <varao@redhat.com>2018-06-28 15:31:36 +0530
committerVarsha Rao <varao@redhat.com>2018-06-28 15:34:13 +0530
commit762ed20a50aea81dcc905c511cc836ea2ea3a1c3 (patch)
tree3d79e641f7c510a588d3c21e4a9568bfa6bab2a4 /xlators/features/barrier
parente9f3097aad47c679a66991b5cfcb590f0840f5d7 (diff)
downloadglusterfs-762ed20a50aea81dcc905c511cc836ea2ea3a1c3.tar.gz
glusterfs-762ed20a50aea81dcc905c511cc836ea2ea3a1c3.tar.xz
glusterfs-762ed20a50aea81dcc905c511cc836ea2ea3a1c3.zip
xlators/features/barrier: Fix RESOURCE_LEAK
Free priv to fix the resource_leak coverity issue. Change-Id: I1f93f54d7d59eddb0b9523ac2b67ef0b279122bd updates: bz#789278 Signed-off-by: Varsha Rao <varao@redhat.com>
Diffstat (limited to 'xlators/features/barrier')
-rw-r--r--xlators/features/barrier/src/barrier.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c
index 4401e3459a..27f3135c3a 100644
--- a/xlators/features/barrier/src/barrier.c
+++ b/xlators/features/barrier/src/barrier.c
@@ -643,6 +643,9 @@ init (xlator_t *this)
this->private = priv;
ret = 0;
out:
+ if (ret && priv)
+ GF_FREE (priv);
+
return ret;
}