mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
anticipate Statslog to avoid using dangling pointers (ITS#5775) - HEADS-UP: now 'ENTRY dn=' may appear also in case the PDU can't be sent
This commit is contained in:
parent
7ec3743aa5
commit
ffb66f41bb
@ -747,7 +747,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||||||
BerElement *ber = (BerElement *) &berbuf;
|
BerElement *ber = (BerElement *) &berbuf;
|
||||||
Attribute *a;
|
Attribute *a;
|
||||||
int i, j, rc = LDAP_UNAVAILABLE, bytes;
|
int i, j, rc = LDAP_UNAVAILABLE, bytes;
|
||||||
char *edn;
|
|
||||||
int userattrs;
|
int userattrs;
|
||||||
AccessControlState acl_state = ACL_STATE_INIT;
|
AccessControlState acl_state = ACL_STATE_INIT;
|
||||||
int attrsonly;
|
int attrsonly;
|
||||||
@ -810,8 +809,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
edn = rs->sr_entry->e_nname.bv_val;
|
|
||||||
|
|
||||||
if ( op->o_res_ber ) {
|
if ( op->o_res_ber ) {
|
||||||
/* read back control or LDAP_CONNECTIONLESS */
|
/* read back control or LDAP_CONNECTIONLESS */
|
||||||
ber = op->o_res_ber;
|
ber = op->o_res_ber;
|
||||||
@ -1198,6 +1195,9 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Statslog( LDAP_DEBUG_STATS2, "%s ENTRY dn=\"%s\"\n",
|
||||||
|
op->o_log_prefix, rs->sr_entry->e_nname.bv_val, 0, 0, 0 );
|
||||||
|
|
||||||
if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
|
if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
|
||||||
be_entry_release_rw( op, rs->sr_entry, 0 );
|
be_entry_release_rw( op, rs->sr_entry, 0 );
|
||||||
rs->sr_flags ^= REP_ENTRY_MUSTRELEASE;
|
rs->sr_flags ^= REP_ENTRY_MUSTRELEASE;
|
||||||
@ -1225,9 +1225,6 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
|
|||||||
ldap_pvt_thread_mutex_unlock( &op->o_counters->sc_mutex );
|
ldap_pvt_thread_mutex_unlock( &op->o_counters->sc_mutex );
|
||||||
}
|
}
|
||||||
|
|
||||||
Statslog( LDAP_DEBUG_STATS2, "%s ENTRY dn=\"%s\"\n",
|
|
||||||
op->o_log_prefix, edn, 0, 0, 0 );
|
|
||||||
|
|
||||||
Debug( LDAP_DEBUG_TRACE,
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
"<= send_search_entry: conn %lu exit.\n", op->o_connid, 0, 0 );
|
"<= send_search_entry: conn %lu exit.\n", op->o_connid, 0, 0 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user