From 892c803c5bdee976d367da244276255e1034aeac Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 3 Nov 2021 12:52:08 +1100 Subject: [PATCH] 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 --- csrc/oceani.mdc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.43.0