andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 4a92b1a53f9623fe655760d8d569e6db0f77a877 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 22 Sep 2015 13:58:38 -0400
Subject: [PATCH 342/342] 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 17834f91f7ea6a88be34b0094b53484498142d40)
---
 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 20b5ab1..1852cf6 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -440,7 +440,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