andykimpe / rpms / 389-ds-base

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