]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (lt_dlhandle_iterate): Fix endless loop.
authorEric Blake <ebb9@byu.net>
Sun, 13 Nov 2005 21:59:54 +0000 (21:59 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 13 Nov 2005 21:59:54 +0000 (21:59 +0000)
(lt_dlinterface_register): Fail if lt__strdup did.

ChangeLog
libltdl/ltdl.c

index 85475683c72c8f4f950c7b59edc6826327a32d19..339be7da4a5aa6cb5a39dfb143dd00807ea7a6bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-13  Eric Blake  <ebb9@byu.net>
+
+       * libltdl/ltdl.c (lt_dlhandle_iterate): Fix endless loop.
+       (lt_dlinterface_register): Fail if lt__strdup did.
+
 2005-11-13  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
 
        * libltdl/m4/libtool.m4 (_LT_LANG_C_CONFIG):
index 38b6bdc2d0de4e7d267daef814d6c8dfebc24872..77a7ffeb0d6efc4ece23fb5f22649a63f027b541 100644 (file)
@@ -2027,7 +2027,10 @@ lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface)
   if (interface_id)
     {
       interface_id->id_string = lt__strdup (id_string);
-      interface_id->iface = iface;
+      if (!interface_id->id_string)
+       FREE (interface_id);
+      else
+       interface_id->iface = iface;
     }
 
   return (lt_dlinterface_id) interface_id;
@@ -2125,6 +2128,8 @@ lt_dlhandle_iterate (lt_dlinterface_id iface, lt_dlhandle place)
 
   if (!handle)
     handle = (lt__handle *) handles;
+  else
+    handle = handle->next;
 
   /* advance while the interface check fails */
   while (handle && iterator->iface