summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-04-20 13:16:59 +0200
committerVijay Bellur <vbellur@redhat.com>2015-04-24 22:27:09 -0700
commitde9d06cd7cfca0b42beffe003e7c1e09d469ca7e (patch)
tree5f4150ccc0ce8b6a7477fe496a50db29a251fd23 /xlators/cluster
parent1b309fd9f80a84f1ccde59dca4a4362213e70f7f (diff)
xlators/cluster/dht: Fix Resource leak (CID 1291751)
Coverity CID 1291751. Guenther Change-Id: Ibe9dc3662811dc5889f85fa063ab9211fcaf7f12 BUG: 789278 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: http://review.gluster.org/10301 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/tier.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 5c3c3aa5548..cbe91c362c8 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -678,7 +678,7 @@ tier_get_bricklist (xlator_t *xl, dict_t *bricklist)
char *rv = NULL;
char *rh = NULL;
char localhost[256] = {0};
- char *db_path = "";
+ char *db_path = NULL;
char *brickname = NULL;
char db_name[PATH_MAX] = "";
int ret = 0;
@@ -730,6 +730,8 @@ tier_get_bricklist (xlator_t *xl, dict_t *bricklist)
ret = tier_get_bricklist(child->xlator, bricklist);
}
out:
+ GF_FREE (db_path);
+
return ret;
}