mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 03:59:34 -05:00
ITS#7906 fix ppolicy_connection_destroy
It can still run after ppolicy_close has freed the connection table
This commit is contained in:
parent
011eb3a27c
commit
05402c396d
1 changed files with 4 additions and 3 deletions
|
|
@ -1273,7 +1273,7 @@ ppolicy_bind( Operation *op, SlapReply *rs )
|
|||
static int
|
||||
ppolicy_connection_destroy( BackendDB *bd, Connection *conn )
|
||||
{
|
||||
if ( !BER_BVISEMPTY( &pwcons[conn->c_conn_idx].dn )) {
|
||||
if ( pwcons && !BER_BVISEMPTY( &pwcons[conn->c_conn_idx].dn )) {
|
||||
ch_free( pwcons[conn->c_conn_idx].dn.bv_val );
|
||||
BER_BVZERO( &pwcons[conn->c_conn_idx].dn );
|
||||
}
|
||||
|
|
@ -2334,9 +2334,10 @@ ppolicy_close(
|
|||
/* Perhaps backover should provide bi_destroy hooks... */
|
||||
ov_count--;
|
||||
if ( ov_count <=0 && pwcons ) {
|
||||
pwcons--;
|
||||
free( pwcons );
|
||||
pw_conn *pwc = pwcons;
|
||||
pwcons = NULL;
|
||||
pwc--;
|
||||
ch_free( pwc );
|
||||
}
|
||||
free( pi->def_policy.bv_val );
|
||||
free( pi );
|
||||
|
|
|
|||
Loading…
Reference in a new issue