From a1bf6fbc0826e5ef48fcce7fcdc6069b03894ba0 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Mon, 27 Apr 2015 13:04:44 -0400
Subject: [PATCH] Ticket 48151 - fix coverity issues
13156 - Deref after NULL check
13157 - Uninitialized var
13158 - Uninitialized var
https://fedorahosted.org/389/ticket/48151
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit f0e700b5a0df5919bc6963bf5339cdff861becbc)
(cherry picked from commit 8d46178f490f49bff72cbf2823cd8d4416ab995b)
---
ldap/servers/plugins/replication/repl5_replica_config.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 9f9197e..a9aeed3 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -1244,7 +1244,7 @@ replica_cleanall_ruv_task(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
Slapi_Task *task = NULL;
const Slapi_DN *task_dn;
Slapi_DN *dn = NULL;
- ReplicaId rid;
+ ReplicaId rid = -1;
Object *r;
const char *force_cleaning;
const char *base_dn;
@@ -2376,7 +2376,7 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
int rc = -1, ret, rid;
if(clean_data == NULL){
- cleanruv_log(NULL, clean_data->rid, CLEANALLRUV_ID, "delete_cleaned_rid_config: cleanruv data is NULL, "
+ cleanruv_log(NULL, -1, CLEANALLRUV_ID, "delete_cleaned_rid_config: cleanruv data is NULL, "
"failed to clean the config.");
return;
}
@@ -2517,7 +2517,7 @@ replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter
Slapi_Task *task = NULL;
Slapi_DN *sdn = NULL;
Replica *replica;
- ReplicaId rid;;
+ ReplicaId rid = -1;
Object *r;
const char *certify_all;
const char *base_dn;
--
1.9.3