mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
ITS#8747 Avoid epoch recursion in connection_write_cb
This commit is contained in:
parent
2c1bb42f01
commit
4f4997551d
@ -322,7 +322,10 @@ connection_write_cb( evutil_socket_t s, short what, void *arg )
|
||||
return;
|
||||
}
|
||||
|
||||
epoch = epoch_join();
|
||||
/* If what == 0, we have a caller as opposed to being a callback */
|
||||
if ( what ) {
|
||||
epoch = epoch_join();
|
||||
}
|
||||
|
||||
checked_lock( &c->c_io_mutex );
|
||||
Debug( LDAP_DEBUG_CONNS, "connection_write_cb: "
|
||||
@ -369,7 +372,9 @@ connection_write_cb( evutil_socket_t s, short what, void *arg )
|
||||
|
||||
done:
|
||||
RELEASE_REF( c, c_refcnt, c->c_destroy );
|
||||
epoch_leave( epoch );
|
||||
if ( what ) {
|
||||
epoch_leave( epoch );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user