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.
This commit is contained in:
Pavel Raiskup 2016-02-12 16:03:14 +01:00
parent 5944fdcc73
commit b5d44b8447
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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);