From: NeilBrown Date: Wed, 3 Nov 2021 01:52:08 +0000 (+1100) Subject: oceani: var storage needs to be free last X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=892c803c5bdee976d367da244276255e1034aeac oceani: var storage needs to be free last As type may store initializers in storage, but these might not get into the var list in an error, we need to free that storage last. Signed-off-by: NeilBrown --- diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index e399a2a..c3ec2a0 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -264,6 +264,7 @@ structures can be used. } ## free context vars ## free context types + ## free context storage exit(context.parse_error ? 1 : 0); } @@ -1318,7 +1319,7 @@ For this we have `scope_finalize()`. c->local = calloc(1, c->local_size); } -###### free context vars +###### free context storage free(context.global); free(context.local);