Commit 659dafb7 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

use slab allocation

parent 2396cf7d
......@@ -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 ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment