diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-04-22 10:21:40 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-04-22 10:21:40 +0200 |
| commit | fd47fc3d12cb910c2ec7739315e186b1bb3297d9 (patch) | |
| tree | 6dc132ecdad9f32f38702dd7eb44311397be1a2a /src/wrapped | |
| parent | c74d8bb6028ec1d16aef04f7ae4cbc6bca34a044 (diff) | |
| download | box64-fd47fc3d12cb910c2ec7739315e186b1bb3297d9.tar.gz box64-fd47fc3d12cb910c2ec7739315e186b1bb3297d9.zip | |
inc ref count for dlopen with RTL_NOLOAD
Diffstat (limited to 'src/wrapped')
| -rwxr-xr-x | src/wrapped/wrappedlibdl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c index 2effca89..839b3fa5 100755 --- a/src/wrapped/wrappedlibdl.c +++ b/src/wrapped/wrappedlibdl.c @@ -136,10 +136,9 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag) printf_dlsym(LOG_DEBUG, " => not present anymore\n"); return NULL; // don't re-open in RTLD_NOLOAD mode } - } else { - IncRefCount(dl->dllibs[i].lib, emu); - ++dl->dllibs[i].count; } + IncRefCount(dl->dllibs[i].lib, emu); + ++dl->dllibs[i].count; printf_dlsym(LOG_DEBUG, "dlopen: Recycling %s/%p count=%ld (dlopened=%ld, elf_index=%d)\n", rfilename, (void*)(i+1), dl->dllibs[i].count, dl->dllibs[i].dlopened, GetElfIndex(dl->dllibs[i].lib)); return (void*)(i+1); } |