From: Michel Pollet Date: Thu, 2 Sep 2010 11:56:29 +0000 (+0100) Subject: simavr: Deallocate resources X-Git-Tag: v1.0a6~12 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=c8c74557657e0b89904538344f2127128c95d62a;p=sx%2Fsimavr.git simavr: Deallocate resources Deallocate memory and IO modules at teardown Signed-off-by: Michel Pollet --- 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)