#ifdef CSRIMALLOC
#define ber_memalloc malloc
#define ber_memrealloc realloc
+#define ber_memfree free
#else
#include "lber.h"
#endif
if ( (*root)->avl_left == 0 ) {
*root = (*root)->avl_right;
*shorter = 1;
- free( (char *) savenode );
+ ber_memfree( (char *) savenode );
return( savedata );
/* no right child */
} else if ( (*root)->avl_right == 0 ) {
*root = (*root)->avl_left;
*shorter = 1;
- free( (char *) savenode );
+ ber_memfree( (char *) savenode );
return( savedata );
}
if ( dfree )
(*dfree)( root->avl_data );
- free( root );
+ ber_memfree( root );
return( nleft + nright + 1 );
}
avl_getfirst( Avlnode *root )
{
if ( avl_list ) {
- free( (char *) avl_list);
+ ber_memfree( (char *) avl_list);
avl_list = (void* *) 0;
}
avl_maxlist = 0;
return( 0 );
if ( avl_nextlist == avl_maxlist ) {
- free( (void*) avl_list);
+ ber_memfree( (void*) avl_list);
avl_list = (void* *) 0;
return( 0 );
}