mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
use slab allocation
This commit is contained in:
parent
c5cf99dd4d
commit
f57a216f1c
1 changed files with 3 additions and 2 deletions
|
|
@ -195,7 +195,8 @@ ldap_back_search(
|
|||
for ( i = 0; !BER_BVISNULL( &op->ors_attrs[i].an_name ); i++ )
|
||||
/* just count attrs */ ;
|
||||
|
||||
attrs = ch_malloc( ( i + 1 )*sizeof( char * ) );
|
||||
attrs = op->o_tmpalloc( ( i + 1 )*sizeof( char * ),
|
||||
op->o_tmpmemctx );
|
||||
if ( attrs == NULL ) {
|
||||
rs->sr_err = LDAP_NO_MEMORY;
|
||||
rc = -1;
|
||||
|
|
@ -609,7 +610,7 @@ finish:;
|
|||
}
|
||||
|
||||
if ( attrs ) {
|
||||
ch_free( attrs );
|
||||
op->o_tmpfree( attrs, op->o_tmpmemctx );
|
||||
}
|
||||
|
||||
if ( lc != NULL ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue