+ if ( op->o_dn.bv_val != NULL ) {
+ free( op->o_dn.bv_val );
+ }
+ if ( op->o_ndn.bv_val != NULL ) {
+ free( op->o_ndn.bv_val );
+ }
+ if ( op->o_authmech.bv_val != NULL ) {
+ free( op->o_authmech.bv_val );
+ }
+ if ( op->o_ctrls != NULL ) {
+ slap_free_ctrls( op, op->o_ctrls );
+ }
+
+#ifdef LDAP_CONNECTIONLESS
+ if ( op->o_res_ber != NULL ) {
+ ber_free( op->o_res_ber, 1 );
+ }
+#endif
+
+ slap_sync_cookie_free( &op->o_sync_state, 0 );
+
+ {
+ GroupAssertion *g, *n;
+ for (g = op->o_groups; g; g=n) {
+ n = g->ga_next;
+ sl_free(g, op->o_tmpmemctx);
+ }
+ op->o_groups = NULL;
+ }
+
+#if defined( LDAP_SLAPI )
+ if ( op->o_pb != NULL ) {
+ slapi_pblock_destroy( (Slapi_PBlock *)op->o_pb );
+ slapi_x_free_object_extensions( SLAPI_X_EXT_OPERATION, op );
+ }
+#endif /* defined( LDAP_SLAPI ) */
+
+ if ( op->o_sync_csn.bv_val != NULL ) {
+ ch_free( op->o_sync_csn.bv_val );