833a7c
From b5d44b8447039671ad927ec4b5018ba2816331eb Mon Sep 17 00:00:00 2001
833a7c
From: Pavel Raiskup <praiskup@redhat.com>
833a7c
Date: Fri, 12 Feb 2016 16:03:14 +0100
833a7c
Subject: [PATCH] libltdl: handle ENOMEM sooner
833a7c
833a7c
Fixes bug#19890.  Reported by Tobias Stoeckmann.
833a7c
833a7c
* libltdl/loaders/dld_link.c (vm_open): Do not even try dld_link()
833a7c
in case of ENOMEM.
833a7c
---
833a7c
 libltdl/loaders/dld_link.c | 2 +-
833a7c
 2 files changed, 2 insertions(+), 1 deletion(-)
833a7c
833a7c
diff --git a/libltdl/loaders/dld_link.c b/libltdl/loaders/dld_link.c
833a7c
index a73880f..0edf0df 100644
833a7c
--- a/libltdl/loaders/dld_link.c
833a7c
+++ b/libltdl/loaders/dld_link.c
833a7c
@@ -112,7 +112,7 @@ vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
833a7c
 {
833a7c
   lt_module module = lt__strdup (filename);
833a7c
 
833a7c
-  if (dld_link (filename) != 0)
833a7c
+  if (module && dld_link (filename) != 0)
833a7c
     {
833a7c
       LT__SETERROR (CANNOT_OPEN);
833a7c
       FREE (module);
833a7c
-- 
833a7c
2.9.3
833a7c