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