mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
fixed compilation with --enable-dmalloc
the macro redefinition of free() means we cannot have a structure element called "free"
This commit is contained in:
parent
5646b6c989
commit
d2d653a1a6
@ -32,7 +32,7 @@ typedef struct _tree_node {
|
||||
typedef struct _tree_root {
|
||||
TREE_NODE *root;
|
||||
int (*compare)(void* x, void *y);
|
||||
void (*free)(void *p);
|
||||
void (*free_func)(void *p);
|
||||
} SORTED_TREE;
|
||||
|
||||
#endif
|
||||
|
@ -65,7 +65,7 @@ SORTED_TREE* sorted_tree_init( void *data_p,
|
||||
ZERO_STRUCTP( tree );
|
||||
|
||||
tree->compare = cmp_fn;
|
||||
tree->free = free_fn;
|
||||
tree->free_func = free_fn;
|
||||
|
||||
if ( !(tree->root = (TREE_NODE*)malloc( sizeof(TREE_NODE) )) ) {
|
||||
SAFE_FREE( tree );
|
||||
@ -110,8 +110,8 @@ void sorted_tree_destroy( SORTED_TREE *tree )
|
||||
if ( tree->root )
|
||||
sorted_tree_destroy_children( tree->root );
|
||||
|
||||
if ( tree->free )
|
||||
tree->free( tree->root );
|
||||
if ( tree->free_func )
|
||||
tree->free_func( tree->root );
|
||||
|
||||
SAFE_FREE( tree );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user