From fb35e344edde1bd18b25e2ecda3456b40105552d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 13 Mar 2009 23:25:00 +0000 Subject: [PATCH] Fix prev commit --- servers/slapd/overlays/syncprov.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index e4a853f698..f3c6e483db 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2388,6 +2388,16 @@ syncprov_op_search( Operation *op, SlapReply *rs ) changed = SS_CHANGED; else if ( newer > 0 ) { /* our state is older, tell consumer nothing */ + if ( sop ) { + syncops **sp = &si->si_ops; + + ldap_pvt_thread_mutex_lock( &si->si_ops_mutex ); + while ( *sp != sop ) + sp = &(*sp)->s_next; + *sp = sop->s_next; + ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex ); + ch_free( sop ); + } rs->sr_err = LDAP_SUCCESS; rs->sr_ctrls = NULL; send_ldap_result( op, rs ); -- 2.39.5