mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#7588 plug memleak
This commit is contained in:
parent
6dab36e97a
commit
f27236b0c0
@ -397,7 +397,19 @@ static void free_sort_op( Connection *conn, sort_op *so )
|
||||
{
|
||||
int sess_id;
|
||||
if ( so->so_tree ) {
|
||||
tavl_free( so->so_tree, ch_free );
|
||||
if ( so->so_paged > SLAP_CONTROL_IGNORED ) {
|
||||
Avlnode *cur_node, *next_node;
|
||||
cur_node = so->so_tree;
|
||||
while ( cur_node ) {
|
||||
next_node = tavl_next( cur_node, TAVL_DIR_RIGHT );
|
||||
ch_free( cur_node->avl_data );
|
||||
ber_memfree( cur_node );
|
||||
|
||||
cur_node = next_node;
|
||||
}
|
||||
} else {
|
||||
tavl_free( so->so_tree, ch_free );
|
||||
}
|
||||
so->so_tree = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user