assert( ber != NULL );
assert( LBER_VALID( ber ) );
- new = (Seqorset *) LBER_CALLOC( 1, sizeof(Seqorset) );
+ new = (Seqorset *) ber_memcalloc_x( 1, sizeof(Seqorset), ber->ber_memctx );
if ( new == NULL ) {
return -1;
}
/* we're done with this seqorset, so free it up */
- LBER_FREE( (char *) (*sos) );
+ ber_memfree_x( (char *) (*sos), ber->ber_memctx );
*sos = next;
return taglen + lenlen + len;
assert( LBER_VALID( ber ) );
- if ( ber->ber_buf) LBER_FREE( ber->ber_buf );
+ if ( ber->ber_buf) ber_memfree_x( ber->ber_buf, ber->ber_memctx );
for( s = ber->ber_sos ; s != NULL ; s = next ) {
next = s->sos_next;
- LBER_FREE( s );
+ ber_memfree_x( s, ber->ber_memctx );
}
ber->ber_buf = NULL;
if( freebuf )
ber_free_buf( ber );
- LBER_FREE( (char *) ber );
+ ber_memfree_x( (char *) ber, ber->ber_memctx );
}
int