diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2017-01-16 12:45:03 +0100 |
---|---|---|
committer | Pavel Raiskup <praiskup@redhat.com> | 2017-01-16 14:38:07 +0100 |
commit | f003a1f96e67f3cb823c1c7081efab445e3f0c83 (patch) | |
tree | 4d973ccaa2ba4d500f2b559a9fdfa319494c4d58 | |
parent | 08c5524fb24b923ad91c2bdca836f1eafa56fd6c (diff) | |
download | libtool-f003a1f96e67f3cb823c1c7081efab445e3f0c83.tar.gz |
libltdl: handle ENOMEM in lt_dlloader_remove()
Reported by Alexander Hass.
* libltdl/lt_dlloader.c (lt_dlloader_remove): Detect NULL return
value from lt_dlinterface_register.
-rw-r--r-- | NO-THANKS | 1 | ||||
-rw-r--r-- | libltdl/lt_dlloader.c | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -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 diff --git a/libltdl/lt_dlloader.c b/libltdl/lt_dlloader.c index ba103c03..dbc645d2 100644 --- a/libltdl/lt_dlloader.c +++ b/libltdl/lt_dlloader.c @@ -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; |