From b5d44b8447039671ad927ec4b5018ba2816331eb Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 12 Feb 2016 16:03:14 +0100 Subject: [PATCH] libltdl: handle ENOMEM sooner Fixes bug#19890. Reported by Tobias Stoeckmann. * libltdl/loaders/dld_link.c (vm_open): Do not even try dld_link() in case of ENOMEM. --- NO-THANKS | 1 + libltdl/loaders/dld_link.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NO-THANKS b/NO-THANKS index 8631c316..090c8638 100644 --- a/NO-THANKS +++ b/NO-THANKS @@ -136,6 +136,7 @@ Ryan Hill dirtyepic@gentoo.org Sebastian Wilhelmi wilhelmi@ira.uka.de Sven Verdoolaege skimo@liacs.nl Terry D. Dontje Terry.Dontje@Sun.COM +Tobias Stoeckmann tobias@stoeckmann.org Tom Tromey tromey@cygnus.com Ulrich Drepper drepper@ipd.info.uni-karlsruhe.de Václav Zeman vhaisman@gmail.com diff --git a/libltdl/loaders/dld_link.c b/libltdl/loaders/dld_link.c index a73880fd..0edf0df6 100644 --- a/libltdl/loaders/dld_link.c +++ b/libltdl/loaders/dld_link.c @@ -112,7 +112,7 @@ vm_open (lt_user_data loader_data LT__UNUSED, const char *filename, { lt_module module = lt__strdup (filename); - if (dld_link (filename) != 0) + if (module && dld_link (filename) != 0) { LT__SETERROR (CANNOT_OPEN); FREE (module);