mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
ITS#10349 Do not leak memberof_t
This commit is contained in:
parent
b4ed8cf783
commit
47e9cd7313
1 changed files with 5 additions and 5 deletions
|
|
@ -1681,11 +1681,6 @@ memberof_db_init(
|
||||||
const char *text = NULL;
|
const char *text = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
mo = (memberof_t *)ch_calloc( 1, sizeof( memberof_t ) );
|
|
||||||
|
|
||||||
/* safe default */
|
|
||||||
mo->mo_dangling_err = LDAP_CONSTRAINT_VIOLATION;
|
|
||||||
|
|
||||||
if ( !ad_memberOf ) {
|
if ( !ad_memberOf ) {
|
||||||
rc = slap_str2ad( SLAPD_MEMBEROF_ATTR, &ad_memberOf, &text );
|
rc = slap_str2ad( SLAPD_MEMBEROF_ATTR, &ad_memberOf, &text );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
|
|
@ -1717,6 +1712,11 @@ memberof_db_init(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mo = (memberof_t *)ch_calloc( 1, sizeof( memberof_t ) );
|
||||||
|
|
||||||
|
/* safe default */
|
||||||
|
mo->mo_dangling_err = LDAP_CONSTRAINT_VIOLATION;
|
||||||
|
|
||||||
on->on_bi.bi_private = (void *)mo;
|
on->on_bi.bi_private = (void *)mo;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue