[389-commits] Branch '389-ds-base-1.2.11' - ldap/servers
Richard Allen Megginson
rmeggins at fedoraproject.org
Fri May 18 21:39:59 UTC 2012
ldap/servers/plugins/replication/csnpl.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit b5f3f98fc0a8f94ecf1b4bf0c68d8a17b75a233b
Author: Rich Megginson <rmeggins at redhat.com>
Date: Fri May 18 15:13:16 2012 -0600
Trac Ticket #359 - Database RUV could mismatch the one in changelog under the stress
https://fedorahosted.org/389/ticket/359
Fix Description:
. Fix for csnplRollUp - was leaking the node data - since
llistRemoveCurrentAndGetNext will detach the current node,
we have to free the data associated with the current node
first, but not the csn, so set that to NULL first
Reviewed by: nhosoi (Thanks!)
(cherry picked from commit 12567ffd8c5504cd3ba7dc7783e7ca1f237c82be)
diff --git a/ldap/servers/plugins/replication/csnpl.c b/ldap/servers/plugins/replication/csnpl.c
index 16cebf1..b3c2ffd 100644
--- a/ldap/servers/plugins/replication/csnpl.c
+++ b/ldap/servers/plugins/replication/csnpl.c
@@ -101,9 +101,8 @@ CSNPL* csnplNew ()
void
-csnpldata_free(void **data)
+csnpldata_free(csnpldata **data_to_free)
{
- csnpldata **data_to_free = (csnpldata **)data;
if (NULL != data_to_free)
{
if (NULL != (*data_to_free)->csn)
@@ -319,6 +318,10 @@ csnplRollUp(CSNPL *csnpl, CSN **first_commited)
*first_commited = data->csn;
freeit = PR_FALSE;
}
+ /* llistRemoveCurrentAndGetNext will detach the current node
+ so we have to free the data associated with it, but not the csn */
+ data->csn = NULL;
+ csnpldata_free(&data);
data = (csnpldata *)llistRemoveCurrentAndGetNext(csnpl->csnList, &iterator);
} else {
data = (csnpldata *)llistGetNext (csnpl->csnList, &iterator);
More information about the 389-commits
mailing list