diff options
author | midipix <writeonce@midipix.org> | 2025-06-22 19:38:05 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-06-22 19:38:05 +0000 |
commit | c95db3abc594f939033092e0d8c925c39cba311b (patch) | |
tree | 0ce591646e2a3612981d3b718b1a2f4b60461772 | |
parent | 8ca65c757797371f99c5acb1bb554f797cf2c0ec (diff) | |
download | sltdl-c95db3abc594f939033092e0d8c925c39cba311b.tar.bz2 sltdl-c95db3abc594f939033092e0d8c925c39cba311b.tar.xz |
lt_dlopen_locked(): defer to dlopen()'s path when the module cannot be located.
-rw-r--r-- | src/core/lt_path.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/lt_path.c b/src/core/lt_path.c index ba19135..c0205d7 100644 --- a/src/core/lt_path.c +++ b/src/core/lt_path.c @@ -375,10 +375,16 @@ static struct lt_modctx * lt_dlopen_locked( /* path open (module) */ if (module) { - if ((fdmod = lt_dlpathopen_locked(module,extv,&mpath)) < 0) - return 0; + fdmod = lt_dlpathopen_locked( + module,extv,&mpath); + + if (fdmod >= 0) { + close(fdmod); - close(fdmod); + } else if (!(mpath = strdup(module))) { + lt_setstatus(0,SLTDL_ERR_SYSTEM_ERROR); + return 0; + } } /* entry alloc */ |