From 5ada65ddf3075552cb2955e7835d26b5864d63fa Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Mon, 21 Apr 2014 11:32:55 -0400
Subject: [PATCH 204/225] Ticket 47771 - Cherry pick issue parentsdn freed
twice
Called slapi_sdn_done twice for the same local variable.
https://fedorahosted.org/389/ticket/47771
(cherry picked from commit b5cd24778cae8c8730c432f3b2a190680100c2bc)
---
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
index c80d75a..f6e6005 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
@@ -361,6 +361,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
}
retval = -1;
CACHE_RETURN(&(inst->inst_cache), &parent);
+ slapi_sdn_done(&parentsdn);
goto error_return;
} else {
/* entry locked, move on */
@@ -397,6 +398,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
op, &haschildren);
/* The modify context now contains info needed later */
if (0 != retval) {
+ slapi_sdn_done(&parentsdn);
ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
@@ -1247,7 +1249,6 @@ diskfull_return:
slapi_ch_free((void**)&errbuf);
slapi_sdn_done(&nscpEntrySDN);
slapi_ch_free_string(&e_uniqueid);
- slapi_sdn_done(&parentsdn);
if (pb->pb_conn)
{
slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "leave conn=%" NSPRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid);
--
1.8.1.4