mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Init/destroy mutex
This commit is contained in:
parent
e6d027ae8f
commit
6db8d0d1b5
1 changed files with 6 additions and 1 deletions
|
|
@ -213,6 +213,7 @@ usn_db_init(
|
|||
}
|
||||
|
||||
ui = ch_calloc(1, sizeof(usn_info_t));
|
||||
ldap_pvt_thread_mutex_init( &ui->ui_mutex );
|
||||
on->on_bi.bi_private = ui;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -278,7 +279,11 @@ usn_db_destroy(
|
|||
)
|
||||
{
|
||||
slap_overinst *on = (slap_overinst *)be->bd_info;
|
||||
ch_free( on->on_bi.bi_private );
|
||||
usn_info_t *ui = on->on_bi.bi_private;
|
||||
|
||||
ldap_pvt_thread_mutex_destroy( &ui->ui_mutex );
|
||||
ch_free( ui );
|
||||
on->on_bi.bi_private = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue