[ELFLOADER] Fixed an issue were fail to load a library might endup unloading used libraries

This commit is contained in:
ptitSeb 2025-04-27 12:38:32 +02:00
parent 7334bb46c6
commit 4add55aa45

View File

@ -354,12 +354,6 @@ int AddNeededLib(lib_t* maplib, int local, int bindnow, int deepbind, needed_lib
printf_log(LOG_INFO, "Error initializing needed lib %s\n", needed->names[i]);
ret = 1;
}
// error while loadind lib, unload...
if(ret) {
int n = needed->size;
for (int i=0; i<n; ++i)
DecRefCount(&needed->libs[n-i-1], emu);
}
// all done
if(BOX64ENV(allow_missing_libs)) return 0;
return ret;