]> git.sur5r.net Git - openldap/commitdiff
ITS#6011 more for refcount'd cookieState
authorHoward Chu <hyc@openldap.org>
Tue, 17 Mar 2009 04:54:09 +0000 (04:54 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 17 Mar 2009 04:54:09 +0000 (04:54 +0000)
servers/slapd/syncrepl.c

index f7ff92a605e35a3967581a233f2a14745e8c0c54..fdf79b0849fb6c8eabe9fe9fdbbe77cb30ec634f 100644 (file)
@@ -4586,13 +4586,11 @@ syncrepl_config( ConfigArgs *c )
                }
                return 1;
        } else if ( c->op == LDAP_MOD_DELETE ) {
-               cookie_state *cs = NULL;
                int isrunning = 0;
                if ( c->be->be_syncinfo ) {
                        syncinfo_t *si, **sip;
                        int i;
 
-                       cs = c->be->be_syncinfo->si_cookieState;
                        for ( sip = &c->be->be_syncinfo, i=0; *sip; i++ ) {
                                si = *sip;
                                if ( c->valx == -1 || i == c->valx ) {
@@ -4640,12 +4638,6 @@ syncrepl_config( ConfigArgs *c )
                }
                if ( !c->be->be_syncinfo ) {
                        SLAP_DBFLAGS( c->be ) &= ~SLAP_DBFLAG_SHADOW_MASK;
-                       if ( cs && !isrunning ) {
-                               ch_free( cs->cs_sids );
-                               ber_bvarray_free( cs->cs_vals );
-                               ldap_pvt_thread_mutex_destroy( &cs->cs_mutex );
-                               ch_free( cs );
-                       }
                }
                return 0;
        }