mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-17 17:48:20 -05:00
alloc temporaries on slab
This commit is contained in:
parent
d1c4d6481f
commit
eb51129e29
1 changed files with 6 additions and 5 deletions
|
|
@ -815,9 +815,9 @@ ldap_back_entry_get(
|
||||||
if ( oc ) {
|
if ( oc ) {
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
filter = ch_malloc( STRLENOF( "(objectclass=)" )
|
filter = op->o_tmpalloc( STRLENOF( "(objectClass=" ")" )
|
||||||
+ oc->soc_cname.bv_len + 1 );
|
+ oc->soc_cname.bv_len + 1, op->o_tmpmemctx );
|
||||||
ptr = lutil_strcopy( filter, "(objectclass=" );
|
ptr = lutil_strcopy( filter, "(objectClass=" );
|
||||||
ptr = lutil_strcopy( ptr, oc->soc_cname.bv_val );
|
ptr = lutil_strcopy( ptr, oc->soc_cname.bv_val );
|
||||||
*ptr++ = ')';
|
*ptr++ = ')';
|
||||||
*ptr++ = '\0';
|
*ptr++ = '\0';
|
||||||
|
|
@ -830,6 +830,7 @@ retry:
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: timeout? */
|
||||||
rc = ldap_search_ext_s( lc->lc_ld, ndn->bv_val, LDAP_SCOPE_BASE, filter,
|
rc = ldap_search_ext_s( lc->lc_ld, ndn->bv_val, LDAP_SCOPE_BASE, filter,
|
||||||
attrp, 0, ctrls, NULL,
|
attrp, 0, ctrls, NULL,
|
||||||
NULL, LDAP_NO_LIMIT, &result );
|
NULL, LDAP_NO_LIMIT, &result );
|
||||||
|
|
@ -872,7 +873,7 @@ cleanup:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( filter ) {
|
if ( filter ) {
|
||||||
ch_free( filter );
|
op->o_tmpfree( filter, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( lc != NULL ) {
|
if ( lc != NULL ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue