]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/slist.c (slist_cons): Don't leak the tail of a list.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Sep 2004 01:31:58 +0000 (01:31 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 3 Sep 2004 01:31:58 +0000 (01:31 +0000)
ChangeLog
libltdl/slist.c

index c90ba2e1d53d1966a6a4e413ea8e4d7542248e16..5dd1fca3ff2690673c98fb21d38e6f9fa63e2411 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/slist.c (slist_cons): Don't leak the tail of a list.
+
 2004-09-03  Albert Chin-A-Young  <china@thewrittenword.com>
 
        * m4/libtool.m4 (_LT_ENABLE_LOCK): Reformatted.
index 06ccf346f8be79cb2f651462ec677ba17433d2d4..ae2c0590f3cb1bb8704f577fe78e540abd861359 100644 (file)
@@ -165,6 +165,8 @@ slist_cons (SList *item, SList *slist)
       return slist;
     }
 
+  assert (!item->next);
+
   item->next = slist;
   return item;
 }
@@ -206,7 +208,7 @@ slist_length (SList *slist)
 /* Destructively reverse the order of items in SLIST.  The value of SLIST
    is undefined after calling this function.
 
-  CAVEAT: You must stare the result of this function, or you might not
+  CAVEAT: You must store the result of this function, or you might not
           be able to get all the items except the first one back again.
 
   e.g.    slist = slist_reverse (slist);  */