From c8c74557657e0b89904538344f2127128c95d62a Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Thu, 2 Sep 2010 12:56:29 +0100 Subject: [PATCH] simavr: Deallocate resources Deallocate memory and IO modules at teardown Signed-off-by: Michel Pollet --- simavr/sim/sim_avr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index d15f7f2..73883d4 100644 --- a/simavr/sim/sim_avr.c +++ b/simavr/sim/sim_avr.c @@ -53,6 +53,11 @@ void avr_terminate(avr_t * avr) if (avr->vcd) avr_vcd_close(avr->vcd); avr->vcd = NULL; + avr_deallocate_ios(avr); + + free(avr->flash); + free(avr->data); + avr->flash = avr->data = NULL; } void avr_reset(avr_t * avr) -- 2.20.1