[xiph-cvs] cvs commit: avl avl.c

Ed oddsock at xiph.org
Fri Oct 31 11:18:42 PST 2003



oddsock     03/10/31 14:18:42

  Modified:    .        avl.c
  Log:
  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 :)

Revision  Changes    Path
1.9       +3 -1      avl/avl.c

Index: avl.c
===================================================================
RCS file: /usr/local/cvsroot/avl/avl.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- avl.c	29 Jul 2003 00:30:36 -0000	1.8
+++ avl.c	31 Oct 2003 19:18:42 -0000	1.9
@@ -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 @@
   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_helper (tree->root->right, free_key_fun);
   }
   if (tree->root) {
+    thread_rwlock_destroy(&tree->root->rwlock);
     free (tree->root);
   }
   thread_rwlock_destroy(&tree->rwlock);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list