From 9e3517595d0f9e3e6e7cfe09fca7e8468a33f594 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 21 Jan 2010 13:33:21 +0000 Subject: [PATCH] Plugged memory leak. Syncentry wasn't free'd when sending LDAP_SYNC_NEW_COOKIE intermediate results. (ITS#6459) --- servers/slapd/overlays/syncprov.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 2cbc9722cc..6cb7cfb17d 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -932,9 +932,9 @@ syncprov_qplay( Operation *op, syncops *so ) ldap_pvt_thread_mutex_unlock( &so->s_mutex ); if ( sr->s_mode == LDAP_SYNC_NEW_COOKIE ) { - SlapReply rs = { REP_INTERMEDIATE }; + SlapReply rs = { REP_INTERMEDIATE }; - rc = syncprov_sendinfo( op, &rs, LDAP_TAG_SYNC_NEW_COOKIE, + rc = syncprov_sendinfo( op, &rs, LDAP_TAG_SYNC_NEW_COOKIE, &sr->s_csn, 0, NULL, 0 ); } else { opc.sdn = sr->s_dn; @@ -946,11 +946,11 @@ syncprov_qplay( Operation *op, syncops *so ) rc = syncprov_sendresp( op, &opc, so, sr->s_mode ); - if ( opc.se ) { - if ( !dec_mutexint( opc.se->e_private )) { - opc.se->e_private = NULL; - entry_free ( opc.se ); - } + } + if ( sr->s_e ) { + if ( !dec_mutexint( sr->s_e->e_private )) { + sr->s_e->e_private = NULL; + entry_free ( sr->s_e ); } } -- 2.39.5