From 273c895747d073d43a1e8617218d4bfd2cf13f18 Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Wed, 17 Oct 2018 13:08:59 +0530 Subject: ctr: fix coverity issue in changetimerecorder.c This patch fixes CID: 1396179: Read from pointer after free 1396178: Use after free Change-Id: I47a2e4aa257e0c4dbdf2e1fd2e0748902764463f fixes: bz#789278 Signed-off-by: Mohit Agrawal --- xlators/features/changetimerecorder/src/changetimerecorder.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xlators/features/changetimerecorder') diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index e25f6304def..3c63c43ee3d 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -1972,7 +1972,6 @@ initialize_ctr_resource(xlator_t *this, gf_ctr_private_t *priv) gf_msg(this->name, GF_LOG_ERROR, 0, CTR_MSG_CREATE_LOCAL_MEMORY_POOL_FAILED, "failed to create local memory pool"); - ret_db = -1; goto error; } @@ -1981,7 +1980,6 @@ initialize_ctr_resource(xlator_t *this, gf_ctr_private_t *priv) if (!priv->_db_conn) { gf_msg(this->name, GF_LOG_ERROR, 0, CTR_MSG_FATAL_ERROR, "FATAL: Failed initializing data base"); - ret_db = -1; goto error; } @@ -1996,7 +1994,7 @@ error: GF_FREE(priv->ctr_db_path); } GF_FREE(priv); - + ret_db = -1; out: if (params_dict) dict_unref(params_dict); -- cgit