Blob Blame Raw
From 3a3d1f22ea262270bc859aeb4c80928d5a085817 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 22 Sep 2015 13:58:38 -0400
Subject: [PATCH 65/65] Ticket 48266 - do not free repl keep alive entry on
 error

Description:  There is no need to free the "repl keep alive" entry
              if any stage of the "add" fails.  Otherwise we could
              potentially run into a double free.

https://fedorahosted.org/389/ticket/48266

Reviewed by: nhosoi(Thanks!)

(cherry picked from commit e5d9b0c741af1c3ea5e8212148a3ba95ee18925b)
(cherry picked from commit f95e73f620987de9107246b30b28fd463024b61f)
---
 ldap/servers/plugins/replication/repl5_replica.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index 708008c..8b53f3c 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -456,7 +456,6 @@ replica_subentry_create(Slapi_DN *repl_root, ReplicaId rid)
                 "create replication keep alive entry %s: %s\n", slapi_entry_get_dn_const(e),
                 ldap_err2string(return_value));
         rc = -1;
-        slapi_entry_free(e); /* The entry was not consumed */
         goto done;
     }
 
-- 
1.9.3