diff options
author | midipix <writeonce@midipix.org> | 2025-06-22 16:07:47 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-06-22 16:07:47 +0000 |
commit | 119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7 (patch) | |
tree | 8415b2872508b7d47ae76e609cdbc07ee041fbdc | |
parent | 130e2180398d23fec3228f9507d84791e738b826 (diff) | |
download | sltdl-119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7.tar.bz2 sltdl-119aabcb74c9644e3a6d03d6f87d8d9aba6d35a7.tar.xz |
lt_dlopen(): properly handle multiple attempts to preload the same symbol table.
-rw-r--r-- | src/core/lt_path.c | 5 |
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; |