be->be_pending_csn_list = (struct be_pcl *)
                ch_calloc( 1, sizeof( struct be_pcl ));
-       build_new_dn( &be->be_context_csn, be->be_nsuffix,
-               (struct berval *)&slap_ldapsync_cn_bv, NULL );
 
        LDAP_TAILQ_INIT( be->be_pending_csn_list );
 
                                struct slap_csn_entry *tmp_csne = csne;
 
                                LDAP_TAILQ_REMOVE( bd->be_pending_csn_list, csne, ce_csn_link );
-                               ch_free( csne->ce_csn->bv_val );
-                               ch_free( csne->ce_csn );
+                               ch_free( csne->ce_csn.bv_val );
                                csne = LDAP_TAILQ_NEXT( csne, ce_csn_link );
                                ch_free( tmp_csne );
                        }
                if ( bd->be_rootdn.bv_val ) free( bd->be_rootdn.bv_val );
                if ( bd->be_rootndn.bv_val ) free( bd->be_rootndn.bv_val );
                if ( bd->be_rootpw.bv_val ) free( bd->be_rootpw.bv_val );
-               if ( bd->be_context_csn.bv_val ) free( bd->be_context_csn.bv_val );
                acl_destroy( bd->be_acl, frontendDB->be_acl );
        }
        free( backendDB );
        be->be_requires = frontendDB->be_requires;
        be->be_ssf_set = frontendDB->be_ssf_set;
 
-       be->be_context_csn.bv_len = 0;
-       be->be_context_csn.bv_val = NULL;
        be->be_pcl_mutexp = &be->be_pcl_mutex;
        ldap_pvt_thread_mutex_init( be->be_pcl_mutexp );
 
 
                if ( csne->ce_state == SLAP_CSN_PENDING ) break;
        }
 
-       if ( committed_csne ) ber_dupbv_x( csn, committed_csne->ce_csn, op->o_tmpmemctx );
+       if ( committed_csne ) ber_dupbv_x( csn, &committed_csne->ce_csn, op->o_tmpmemctx );
        ldap_pvt_thread_mutex_unlock( op->o_bd->be_pcl_mutexp );
 }
 
                if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) {
                        LDAP_TAILQ_REMOVE( op->o_bd->be_pending_csn_list,
                                csne, ce_csn_link );
-                       ch_free( csne->ce_csn->bv_val );
-                       ch_free( csne->ce_csn );
+                       ch_free( csne->ce_csn.bv_val );
                        ch_free( csne );
                        break;
                }
                        sizeof( struct slap_csn_entry ));
        ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp );
 
-       pending->ce_csn = ber_dupbv( NULL, csn );
+       ber_dupbv( &pending->ce_csn, csn );
        pending->ce_connid = op->o_connid;
        pending->ce_opid = op->o_opid;
        pending->ce_state = SLAP_CSN_PENDING;
 
        struct          be_pcl  *be_pending_csn_list;
        ldap_pvt_thread_mutex_t                                 be_pcl_mutex;
        ldap_pvt_thread_mutex_t                                 *be_pcl_mutexp;
-       struct berval                                                   be_context_csn;
        LDAP_STAILQ_HEAD( be_si, syncinfo_s )   be_syncinfo; /* For syncrepl */
 
        char    *be_realm;
 };
 
 struct slap_csn_entry {
-       struct berval *ce_csn;
+       struct berval ce_csn;
        unsigned long ce_opid;
        unsigned long ce_connid;
 #define SLAP_CSN_PENDING       1