From 29f2de478cc6a475e6ae760d9cbe7ac847e9d79c Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 13 Apr 2012 17:29:41 +0530 Subject: core: coverity issues fixed this is not a complete set of issues getting fixed. Will address other issues in another patch. Change-Id: Ib01c7b11b205078cc4d0b3f11610751e32d14b69 Signed-off-by: Amar Tumballi BUG: 789278 Reviewed-on: http://review.gluster.com/3145 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/performance/io-threads/src/io-threads.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'xlators/performance/io-threads/src/io-threads.c') diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 66864fcd438..04abac7ad31 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -2489,9 +2489,9 @@ out: int init (xlator_t *this) { - iot_conf_t *conf = NULL; - int ret = -1; - int i = 0; + iot_conf_t *conf = NULL; + int ret = -1; + int i = 0; if (!this->children || this->children->next) { gf_log ("io-threads", GF_LOG_ERROR, @@ -2553,13 +2553,15 @@ init (xlator_t *this) if (ret == -1) { gf_log (this->name, GF_LOG_ERROR, "cannot initialize worker threads, exiting init"); - GF_FREE (conf); goto out; } this->private = conf; ret = 0; out: + if (ret) + GF_FREE (conf); + return ret; } -- cgit