summaryrefslogtreecommitdiffstats
path: root/src/tests/dlopen-tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/dlopen-tests.c')
-rw-r--r--src/tests/dlopen-tests.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/dlopen-tests.c b/src/tests/dlopen-tests.c
index 40e02daa2..dd4cc754a 100644
--- a/src/tests/dlopen-tests.c
+++ b/src/tests/dlopen-tests.c
@@ -102,7 +102,8 @@ static bool recursive_dlopen(const char **name, int round, char **errmsg)
handle = dlopen(name[round], RTLD_GLOBAL|RTLD_NOW);
if (!handle) {
- asprintf(errmsg, "dlopen() failed: %s", dlerror());
+ if (asprintf(errmsg, "dlopen() failed: %s", dlerror()) == -1)
+ *errmsg = NULL;
return false;
}