diff options
Diffstat (limited to 'arch/sandbox/cpu/state.c')
-rw-r--r-- | arch/sandbox/cpu/state.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 69da378ab59..d67834988fd 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -10,6 +10,7 @@ #include <fdtdec.h> #include <log.h> #include <os.h> +#include <trace.h> #include <asm/malloc.h> #include <asm/state.h> #include <asm/test.h> @@ -525,6 +526,10 @@ int state_uninit(void) if (state->jumped_fname) os_unlink(state->jumped_fname); + /* Disable tracing before unmapping RAM */ + if (IS_ENABLED(CONFIG_TRACE)) + trace_set_enabled(0); + os_free(state->state_fdt); os_free(state->ram_buf); memset(state, '\0', sizeof(*state)); |