mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
let c_conn_idx be -1 (ITS#5235?)
This commit is contained in:
parent
af1492d189
commit
3c6714051e
1 changed files with 6 additions and 2 deletions
|
|
@ -2121,8 +2121,11 @@ ppolicy_db_init(
|
|||
|
||||
on->on_bi.bi_private = ch_calloc( sizeof(pp_info), 1 );
|
||||
|
||||
if ( dtblsize && !pwcons )
|
||||
pwcons = ch_calloc(sizeof(pw_conn), dtblsize );
|
||||
if ( dtblsize && !pwcons ) {
|
||||
/* accommodate for c_conn_idx == -1 */
|
||||
pwcons = ch_calloc( sizeof(pw_conn), dtblsize + 1 );
|
||||
pwcons++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2149,6 +2152,7 @@ ppolicy_close(
|
|||
/* Perhaps backover should provide bi_destroy hooks... */
|
||||
ov_count--;
|
||||
if ( ov_count <=0 && pwcons ) {
|
||||
pwcons--;
|
||||
free( pwcons );
|
||||
pwcons = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue