]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libltdl: handle ENOMEM in lt_dlloader_remove()
authorPavel Raiskup <praiskup@redhat.com>
Mon, 16 Jan 2017 11:45:03 +0000 (12:45 +0100)
committerPavel Raiskup <praiskup@redhat.com>
Mon, 16 Jan 2017 13:38:07 +0000 (14:38 +0100)
Reported by Alexander Hass.

* libltdl/lt_dlloader.c (lt_dlloader_remove): Detect NULL return
value from lt_dlinterface_register.

NO-THANKS
libltdl/lt_dlloader.c

index 5aba7c89ac40da6fc572f61ddd1308a3099a1bfd..c59662c0992e46fad11d65e160777abe5606770d 100644 (file)
--- a/NO-THANKS
+++ b/NO-THANKS
@@ -30,6 +30,7 @@ note to the bug-report mailing list (as seen at end of e.g., libtool --help).
 Akim Demaille                  akim@epita.fr
 !Albert Chin
 Albert Chin-A-Young            china@thewrittenword.com
+Alexander Hass                 alexander.hass@sap.com
 Andreas Schwab                 schwab@suse.de
 Brian Barrett                  brbarret@osl.iu.edu
 !Brian W. Barret
index ba103c037a46b82e5a2caa7db19446fea9d15f2a..dbc645d24397a577a3240272dbcc816ceab9feff 100644 (file)
@@ -168,6 +168,10 @@ lt_dlloader_remove (const char *name)
 
   /* Fail if there are any open modules that use this loader.  */
   iface = lt_dlinterface_register (id_string, NULL);
+  if (!iface)
+    /* No memory, error is already set. */
+    return 0;
+
   while ((handle = lt_dlhandle_iterate (iface, handle)))
     {
       lt_dlhandle cur = handle;