]> git.sur5r.net Git - openldap/commitdiff
ITS#6459
authorQuanah Gibson-Mount <quanah@openldap.org>
Wed, 14 Apr 2010 19:56:12 +0000 (19:56 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 14 Apr 2010 19:56:12 +0000 (19:56 +0000)
CHANGES
servers/slapd/overlays/syncprov.c

diff --git a/CHANGES b/CHANGES
index f6e4120a126fef22f70b806943b7fccd0b154194..15d4896d1c5410524b23620192155ee43c5dba3b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,7 @@ OpenLDAP 2.4.22 Engineering
        Fixed slapo-dynlist REP_ENTRY flag handling (ITS#5340,ITS#6423)
        Fixed slapo-rwm olcRwmMap handling (ITS#6436)
        Fixed slapo-rwm REP_ENTRY flag handling (ITS#5340,ITS#6423)
+       Fixed slapo-syncprov memory leak (ITS#6459)
        Fixed slapo-valsort REP_ENTRY flag handling (ITS#5340,ITS#6423)
 
 OpenLDAP 2.4.21 Release (2009/12/20)
index d3584a22384fcae33f8d79a84c622b826fb43313..4ee8a23abcb2659c304c3fa5f0fda151079a3b2c 100644 (file)
@@ -931,9 +931,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;
@@ -945,11 +945,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 );
                        }
                }