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

Brendan brendan at xiph.org
Wed Mar 5 16:59:41 PST 2003



brendan     03/03/05 19:59:41

  Modified:    .        avl.c
  Log:
  rwlocks were not getting destroyed when avl nodes or trees were freed.
  avl.h already includes thread.h

Revision  Changes    Path
1.2       +3 -3      avl/avl.c

Index: avl.c
===================================================================
RCS file: /usr/local/cvsroot/avl/avl.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- avl.c	10 Sep 2001 02:28:03 -0000	1.1
+++ avl.c	6 Mar 2003 00:59:41 -0000	1.2
@@ -22,7 +22,7 @@
  *
  */
 
-/* $Id: avl.c,v 1.1 2001/09/10 02:28:03 jack Exp $ */
+/* $Id: avl.c,v 1.2 2003/03/06 00:59:41 brendan Exp $ */
 
 /*
  * This is a fairly straightfoward translation of a prototype
@@ -32,10 +32,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "thread.h"
 #include "avl.h"
 
-
 avl_node *
 avl_node_new (void *		key,
               avl_node *	parent)
@@ -103,6 +101,7 @@
   if (tree->root) {
     free (tree->root);
   }
+  thread_rwlock_destroy(&tree->rwlock);
   free (tree);
 }
 
@@ -442,6 +441,7 @@
   
   /* return the key and node to storage */
   free_key_fun (x->key);
+  thread_rwlock_destroy (&x->rwlock);
   free (x);
 
   while (shorter && p->parent) {

<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