/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2005-2009 The OpenLDAP Foundation.
+ * Copyright 2005-2012 The OpenLDAP Foundation.
* Portions Copyright 2005 Pierangelo Masarati <ando@sys-net.it>
* All rights reserved.
*
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 */
entry_clean( &rdi->rdi_e );
+ if ( !BER_BVISNULL( &rdi->rdi_unsolicited_oid ) ) {
+ ber_memfree( rdi->rdi_unsolicited_oid.bv_val );
+ if ( !BER_BVISNULL( &rdi->rdi_unsolicited_data ) )
+ ber_memfree( rdi->rdi_unsolicited_data.bv_val );
+ }
+
ch_free( rdi );
}