andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 0ddb8ba7b42403f679b2269087fd39aa322cb1ec Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Mon, 26 Nov 2012 11:04:36 -0500
Subject: [PATCH 18/22] Ticket 526 - Coverity Fixes

12626
13030
13114
13115
13116

Reviewed by: richm (Thanks Rich!)
(cherry picked from commit 4850b2720a6d2a1cf65b2cbfa296e37f04f85c5d)
(cherry picked from commit 7d22bc2eca8d71ac212879fb28d39c8a31a7be58)
---
 ldap/servers/plugins/replication/cl5_api.c              | 3 ---
 ldap/servers/plugins/replication/repl5_replica_config.c | 6 ++++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
index 6c94b3d..175eb80 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -6554,9 +6554,6 @@ cl5CleanRUV(ReplicaId rid){
         ruv_delete_replica(file->maxRUV, rid);
         obj = objset_next_obj(s_cl5Desc.dbFiles, obj);
     }
-    if(obj){
-        object_release (obj);
-    }
 
     slapi_rwlock_unlock (s_cl5Desc.stLock);
 }
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
index 0fd785b..e234c15 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -1743,7 +1743,7 @@ check_replicas_are_done_cleaning(cleanruv_data *data )
 {
     Object *agmt_obj;
     Repl_Agmt *agmt;
-    char csnstr[CSN_STRSIZE];
+    char *csnstr = NULL;
     char *filter = NULL;
     int not_all_cleaned = 1;
     int interval = 10;
@@ -1786,6 +1786,7 @@ check_replicas_are_done_cleaning(cleanruv_data *data )
             interval = 14400;
         }
     }
+    slapi_ch_free_string(&csnstr);
     slapi_ch_free_string(&filter);
 }
 
@@ -2356,7 +2357,7 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
     struct berval *vals[2];
     struct berval val;
     char data[CSN_STRSIZE + 15];
-    char csnstr[CSN_STRSIZE];
+    char *csnstr = NULL;
     char *dn;
     int rc;
 
@@ -2399,6 +2400,7 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
      }
      slapi_pblock_destroy (pb);
      slapi_ch_free_string(&dn);
+     slapi_ch_free_string(&csnstr);
  }
 
 /*
-- 
1.7.11.7