summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/gfdb
diff options
context:
space:
mode:
authorSubha sree Mohankumar <smohanku@redhat.com>2017-11-11 01:12:02 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-11-13 16:34:39 +0000
commitf6ab03d27cf394f8429b4c77cef0602547f6fd67 (patch)
tree2ecccffe3fe1c94edea1f484961b43c45ee526b2 /libglusterfs/src/gfdb
parent6343b16f53c2563c238a5b42e0e256d7091a7100 (diff)
libglusterfs/gfdb:coverity issue fix
Coverity Id:719,748,761 problem : The value of "ret" is overwritten in init_db and add_conection_node Change-Id: Iade8ca8d61c5e25e8c311b1375219f5f61d51bc3 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
Diffstat (limited to 'libglusterfs/src/gfdb')
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.c b/libglusterfs/src/gfdb/gfdb_data_store.c
index 7074c4a51c2..8ba7606012a 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store.c
+++ b/libglusterfs/src/gfdb/gfdb_data_store.c
@@ -111,6 +111,7 @@ add_connection_node (gfdb_conn_node_t *_conn_node) {
LG_MSG_UNLOCK_LIST_FAILED, "Failed unlock db "
"connection list %s", strerror(ret));
ret = -1;
+ goto out;
/*TODO What if the unlock fails.
* Will it lead to deadlock?
* Most of the gluster code
@@ -261,7 +262,6 @@ init_db (dict_t *args, gfdb_db_type_t gfdb_db_type)
gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0,
LG_MSG_INIT_DB_FAILED, "Failed initializing database "
"operation failed.");
- ret = -1;
goto init_db_failed;
}
@@ -272,7 +272,6 @@ init_db (dict_t *args, gfdb_db_type_t gfdb_db_type)
if (ret) {
gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0,
LG_MSG_INIT_DB_FAILED, "Failed initializing database");
- ret = -1;
goto init_db_failed;
}
_conn_node->gfdb_connection.gfdb_db_type = gfdb_db_type;