andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 0ddb8ba7b42403f679b2269087fd39aa322cb1ec Mon Sep 17 00:00:00 2001
dc8c34
From: Mark Reynolds <mreynolds@redhat.com>
dc8c34
Date: Mon, 26 Nov 2012 11:04:36 -0500
dc8c34
Subject: [PATCH 18/22] Ticket 526 - Coverity Fixes
dc8c34
dc8c34
12626
dc8c34
13030
dc8c34
13114
dc8c34
13115
dc8c34
13116
dc8c34
dc8c34
Reviewed by: richm (Thanks Rich!)
dc8c34
(cherry picked from commit 4850b2720a6d2a1cf65b2cbfa296e37f04f85c5d)
dc8c34
(cherry picked from commit 7d22bc2eca8d71ac212879fb28d39c8a31a7be58)
dc8c34
---
dc8c34
 ldap/servers/plugins/replication/cl5_api.c              | 3 ---
dc8c34
 ldap/servers/plugins/replication/repl5_replica_config.c | 6 ++++--
dc8c34
 2 files changed, 4 insertions(+), 5 deletions(-)
dc8c34
dc8c34
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
dc8c34
index 6c94b3d..175eb80 100644
dc8c34
--- a/ldap/servers/plugins/replication/cl5_api.c
dc8c34
+++ b/ldap/servers/plugins/replication/cl5_api.c
dc8c34
@@ -6554,9 +6554,6 @@ cl5CleanRUV(ReplicaId rid){
dc8c34
         ruv_delete_replica(file->maxRUV, rid);
dc8c34
         obj = objset_next_obj(s_cl5Desc.dbFiles, obj);
dc8c34
     }
dc8c34
-    if(obj){
dc8c34
-        object_release (obj);
dc8c34
-    }
dc8c34
 
dc8c34
     slapi_rwlock_unlock (s_cl5Desc.stLock);
dc8c34
 }
dc8c34
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
dc8c34
index 0fd785b..e234c15 100644
dc8c34
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
dc8c34
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
dc8c34
@@ -1743,7 +1743,7 @@ check_replicas_are_done_cleaning(cleanruv_data *data )
dc8c34
 {
dc8c34
     Object *agmt_obj;
dc8c34
     Repl_Agmt *agmt;
dc8c34
-    char csnstr[CSN_STRSIZE];
dc8c34
+    char *csnstr = NULL;
dc8c34
     char *filter = NULL;
dc8c34
     int not_all_cleaned = 1;
dc8c34
     int interval = 10;
dc8c34
@@ -1786,6 +1786,7 @@ check_replicas_are_done_cleaning(cleanruv_data *data )
dc8c34
             interval = 14400;
dc8c34
         }
dc8c34
     }
dc8c34
+    slapi_ch_free_string(&csnstr);
dc8c34
     slapi_ch_free_string(&filter);
dc8c34
 }
dc8c34
 
dc8c34
@@ -2356,7 +2357,7 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
dc8c34
     struct berval *vals[2];
dc8c34
     struct berval val;
dc8c34
     char data[CSN_STRSIZE + 15];
dc8c34
-    char csnstr[CSN_STRSIZE];
dc8c34
+    char *csnstr = NULL;
dc8c34
     char *dn;
dc8c34
     int rc;
dc8c34
 
dc8c34
@@ -2399,6 +2400,7 @@ delete_cleaned_rid_config(cleanruv_data *clean_data)
dc8c34
      }
dc8c34
      slapi_pblock_destroy (pb);
dc8c34
      slapi_ch_free_string(&dn;;
dc8c34
+     slapi_ch_free_string(&csnstr);
dc8c34
  }
dc8c34
 
dc8c34
 /*
dc8c34
-- 
dc8c34
1.7.11.7
dc8c34