Commit e554386e authored by Ed "oddsock" Zaleski's avatar Ed "oddsock" Zaleski

proper cleanup of the rwlocks in the avl trees.

This was causing some major memory leakage on win32, but was not seen
on unix.  Icecast2 on win32 is leakfree again :)

svn path=/trunk/avl/; revision=5525
parent bdeffe42
......@@ -22,7 +22,7 @@
*
*/
/* $Id: avl.c,v 1.8 2003/07/29 00:30:36 karl Exp $ */
/* $Id: avl.c,v 1.9 2003/10/31 19:18:42 oddsock Exp $ */
/*
* This is a fairly straightfoward translation of a prototype
......@@ -93,6 +93,7 @@ avl_tree_free_helper (avl_node * node, avl_free_key_fun_type free_key_fun)
if (node->right) {
avl_tree_free_helper (node->right, free_key_fun);
}
thread_rwlock_destroy (&node->rwlock);
free (node);
}
......@@ -103,6 +104,7 @@ avl_tree_free (avl_tree * tree, avl_free_key_fun_type free_key_fun)
avl_tree_free_helper (tree->root->right, free_key_fun);
}
if (tree->root) {
thread_rwlock_destroy(&tree->root->rwlock);
free (tree->root);
}
thread_rwlock_destroy(&tree->rwlock);
......
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