* cp-demangle.c (string_list_delete): Don't forget to free the
authorJim Blandy <jimb@codesourcery.com>
Thu, 22 Mar 2001 15:16:04 +0000 (15:16 +0000)
committerJim Blandy <jimb@codesourcery.com>
Thu, 22 Mar 2001 15:16:04 +0000 (15:16 +0000)
actual contents of the string.

libiberty/ChangeLog
libiberty/cp-demangle.c

index 7bc9eb1..f6e537f 100644 (file)
@@ -1,3 +1,9 @@
+2001-03-22  Jim Blandy  <jimb@redhat.com>
+
+       * cp-demangle.c (string_list_delete): Use dyn_string_delete
+       instead of free, to free the contents as well as the string
+       structure.
+
 2001-03-21  Zack Weinberg  <zackw@stanford.edu>
 
        * make-temp-file.c: Always default DIR_SEPARATOR to '/'.
index e436735..b8255b3 100644 (file)
@@ -424,7 +424,7 @@ string_list_delete (node)
   while (node != NULL)
     {
       string_list_t next = node->next;
-      free (node);
+      dyn_string_delete ((dyn_string_t) node);
       node = next;
     }
 }