about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-11-19 21:43:32 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-11-19 21:43:32 +0100
commit1ac0465a03e89127f0eb0d41930cefda70a7cb82 (patch)
tree81ae7cced9e7022932be4611de3cabdc2f182352
parent3533db97ff091ee3950621f1fec60f438a9502b6 (diff)
downloadbox64-1ac0465a03e89127f0eb0d41930cefda70a7cb82.tar.gz
box64-1ac0465a03e89127f0eb0d41930cefda70a7cb82.zip
Small change on unload of box64
-rwxr-xr-xsrc/box64context.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/box64context.c b/src/box64context.c
index 1558811e..ee56ce5a 100755
--- a/src/box64context.c
+++ b/src/box64context.c
@@ -270,6 +270,13 @@ void FreeBox64Context(box64context_t** context)
     if(ctx->tlsdata)
         free(ctx->tlsdata);
 
+    free_neededlib(&ctx->neededlibs);
+
+    if(ctx->emu_sig)
+        FreeX64Emu(&ctx->emu_sig);
+
+    finiAllHelpers(ctx);
+
     pthread_mutex_destroy(&ctx->mutex_once);
     pthread_mutex_destroy(&ctx->mutex_once2);
     pthread_mutex_destroy(&ctx->mutex_trace);
@@ -282,13 +289,6 @@ void FreeBox64Context(box64context_t** context)
     pthread_mutex_destroy(&ctx->mutex_thread);
     pthread_mutex_destroy(&ctx->mutex_bridge);
 
-    free_neededlib(&ctx->neededlibs);
-
-    if(ctx->emu_sig)
-        FreeX64Emu(&ctx->emu_sig);
-
-    finiAllHelpers(ctx);
-
     free(ctx);
 }