summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2025-06-22 16:07:47 +0000
committermidipix <writeonce@midipix.org>2025-06-22 16:07:47 +0000
commit119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7 (patch)
tree8415b2872508b7d47ae76e609cdbc07ee041fbdc /src
parent130e2180398d23fec3228f9507d84791e738b826 (diff)
downloadsltdl-119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7.tar.bz2
sltdl-119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7.tar.xz
lt_dlopen(): properly handle multiple attempts to preload the same symbol table.
Diffstat (limited to 'src')
-rw-r--r--src/core/lt_path.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lt_path.c b/src/core/lt_path.c
index 2017a95..0991e95 100644
--- a/src/core/lt_path.c
+++ b/src/core/lt_path.c
@@ -409,6 +409,11 @@ static struct lt_modctx * lt_dlopen_locked(
}
}
+ /* symbol table already preloaded? */
+ for (modctx=lt_modv_head; symtbl && modctx; modctx=modctx->mnext)
+ if (modctx->symtbl == symtbl)
+ return modctx;
+
/* module or symtbl entry */
modctx = lt_modv_next;
modctx->symtbl = symtbl;