rs->sr_flags = REP_ENTRY_MUSTRELEASE;
rs->sr_err = LDAP_SUCCESS;
rs->sr_err = send_search_entry( op, rs );
+ rs->sr_attrs = NULL;
/* send_search_entry will usually free it.
* an overlay might leave its own copy here;
send_search_entry( op, rs );
rs->sr_entry = NULL;
rs->sr_attrs = NULL;
+ rs->sr_flags = 0;
}
entry_clean( &e );
if( urls != NULL ) ber_bvarray_free( urls );
return 0;
}
-
rs->sr_ctrls = NULL;
}
rs->sr_entry = NULL;
+ rs->sr_flags = 0;
if ( !BER_BVISNULL( &ent.e_name ) ) {
assert( ent.e_name.bv_val != bdn.bv_val );
op->o_tmpfree( ent.e_name.bv_val, op->o_tmpmemctx );
BER_BVZERO( &rs->sr_ref[ cnt ] );
/* ignore return value by now */
+ RS_ASSERT( !(rs->sr_flags & REP_ENTRY_MASK) );
rs->sr_entry = NULL;
( void )send_search_reference( op, rs );
return rc;
}
-
else if ( test_filter( op, e, op->ors_filter ) == LDAP_COMPARE_TRUE ) {
rs->sr_entry = e;
rs->sr_attrs = op->ors_attrs;
+ /* Could set REP_ENTRY_MUSTBEFREED too for efficiency,
+ * but refraining lets us test unFREEable MODIFIABLE
+ * entries. Like entries built on the stack.
+ */
rs->sr_flags = REP_ENTRY_MODIFIABLE;
rc = send_search_entry( op, rs );
rs->sr_entry = NULL;
+ rs->sr_attrs = NULL;
}
}
rs->sr_flags = 0;
rc = send_search_entry( op, rs );
rs->sr_entry = NULL;
+ rs->sr_attrs = NULL;
} else {
rc = 0;
}
rs->sr_attrs = op->ors_attrs;
rs->sr_flags = REP_ENTRY_MODIFIABLE;
send_search_entry( op, rs );
+ rs->sr_flags = 0;
+ rs->sr_attrs = NULL;
}
entry_clean( &e );
rs->sr_attrs = op->ors_attrs;
rs->sr_flags = REP_ENTRY_MODIFIABLE;
send_search_entry( op, rs );
+ rs->sr_flags = 0;
+ rs->sr_entry = NULL;
}
entry_clean( &e );
rs->sr_attrs = op->ors_attrs;
rs->sr_flags = REP_ENTRY_MODIFIABLE;
send_search_entry( op, rs );
+ rs->sr_flags = 0;
+ rs->sr_entry = NULL;
+ rs->sr_attrs = NULL;
}
entry_clean( &e );
rs->sr_flags = REP_ENTRY_MODIFIABLE;
rs->sr_err = LDAP_SUCCESS;
rs->sr_err = send_search_entry( op, rs );
+ rs->sr_flags = 0;
+ rs->sr_attrs = NULL;
+ rs->sr_entry = NULL;
if ( rs->sr_err == LDAP_SIZELIMIT_EXCEEDED ) {
- rs->sr_entry = NULL;
goto done;
}
}
return 0;
}
-
rs->sr_flags = REP_ENTRY_MODIFIABLE;
send_search_entry( op, rs );
entry_free( rs->sr_entry );
+ rs->sr_attrs = NULL;
}
bp = buf;
rs->sr_flags = REP_ENTRY_MODIFIABLE;
send_search_entry( op, rs );
entry_free( rs->sr_entry );
+ rs->sr_attrs = NULL;
}
bp = buf;
if ( rs->sr_rspoid != NULL ) {
free( (char *)rs->sr_rspoid );
+ rs->sr_rspoid = NULL;
}
if ( rs->sr_rspdata != NULL ) {
ber_bvfree( rs->sr_rspdata );
+ rs->sr_rspdata = NULL;
}
} /* end of OpenLDAP extended operation */
rs->sr_entry = &rdi->rdi_e;
rs->sr_err = send_search_entry( op, rs );
+ rs->sr_flags = 0;
rs->sr_entry = NULL;
+ rs->sr_attrs = NULL;
switch ( rs->sr_err ) {
case LDAP_UNAVAILABLE: /* connection closed */
av = tavl_next( av, TAVL_DIR_RIGHT );
}
tavl_free( tc.list, NULL );
+ rs->sr_flags = 0;
rs->sr_entry = NULL;
}
send_ldap_result( op, rs );