summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2018-10-17 13:08:59 +0530
committerSunny Kumar <sunkumar@redhat.com>2018-10-18 06:29:36 +0000
commit273c895747d073d43a1e8617218d4bfd2cf13f18 (patch)
tree76ac504a58d3a026680c9955deeaf3f8de670c05
parent145e180517054626d07892219fdee689b703c218 (diff)
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 <moagrawal@redhat.com>
-rw-r--r--xlators/features/changetimerecorder/src/changetimerecorder.c4
1 files changed, 1 insertions, 3 deletions
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);