From 6eee473eba94697953e8b3e1b04fe5ef1de5f474 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 5 Jun 2012 14:15:54 +0530 Subject: core: coverity fixes (mostly resource leak fixes) currently working on obvious resource leak reports in coverity Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1 Signed-off-by: Amar Tumballi BUG: 789278 Reviewed-on: http://review.gluster.com/3265 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/dht/src/dht-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-helper.c') diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 920a7aabc50..611de19e48e 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -80,7 +80,7 @@ dht_filter_loc_subvol_key (xlator_t *this, loc_t *loc, loc_t *new_loc, int ret = 0; /* not found */ /* Why do other tasks if first required 'char' itself is not there */ - if (!loc->name || !strchr (loc->name, '@')) + if (!new_loc || !loc || !loc->name || !strchr (loc->name, '@')) goto out; trav = this->children; -- cgit