diff options
| author | rajdakin <rajdakin@gmail.com> | 2021-04-09 17:52:59 +0200 |
|---|---|---|
| committer | rajdakin <rajdakin@gmail.com> | 2021-04-09 17:52:59 +0200 |
| commit | 70018a774bf7411ef7550aa4fb3eb153d17dcfd6 (patch) | |
| tree | bd8a6c823b307e1a431a01ea3e27b8d0ac282bfe /src/librarian/library.c | |
| parent | 009bb94f17803dff459b812d7314e300a1b31e1e (diff) | |
| download | box64-70018a774bf7411ef7550aa4fb3eb153d17dcfd6.tar.gz box64-70018a774bf7411ef7550aa4fb3eb153d17dcfd6.zip | |
Fixed the libraries free ordering
Diffstat (limited to 'src/librarian/library.c')
| -rwxr-xr-x | src/librarian/library.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librarian/library.c b/src/librarian/library.c index edde1abb..c144d3b5 100755 --- a/src/librarian/library.c +++ b/src/librarian/library.c @@ -151,7 +151,7 @@ static void initNativeLib(library_t *lib, box64context_t* context) { lib->type = 0; // Call librarian to load all dependant elf for(int i=0; i<lib->priv.w.needed; ++i) { - if(AddNeededLib(context->maplib, &lib->needed, 0, lib->priv.w.neededlibs[i], context, NULL)) { // probably all native, not emulated, so that's fine + if(AddNeededLib(context->maplib, &lib->needed, lib, 0, lib->priv.w.neededlibs[i], context, NULL)) { // probably all native, not emulated, so that's fine printf_log(LOG_NONE, "Error: loading needed libs in elf %s\n", lib->priv.w.neededlibs[i]); return; } @@ -420,6 +420,7 @@ void Free1Library(library_t **lib, x64emu_t* emu) if((*lib)->symbol2map) kh_destroy(symbol2map, (*lib)->symbol2map); free_neededlib(&(*lib)->needed); + free_neededlib(&(*lib)->depended); free(*lib); *lib = NULL; |