Flush tb in uc_close

This commit is contained in:
mio
2025-04-11 11:50:10 +08:00
parent 143b352775
commit e376f98224

3
uc.c
View File

@@ -504,6 +504,9 @@ uc_err uc_close(uc_engine *uc)
return UC_ERR_OK;
}
// Flush all translation buffers or we leak memory allocated by MMU
uc->tb_flush(uc);
// Cleanup internally.
if (uc->release) {
uc->release(uc->tcg_ctx);