summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-10-21 17:03:44 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-10-21 17:18:32 +0200
commitec64a0bc7eabb45783e7031729c5b1ff37821cbd (patch)
treed88d189790f4b1ab560097b881fa23a945918ea7 /src/main.c
parentd6fe39cd18ee0db3a6833fbae86508cf1f68b4a8 (diff)
downloadbison-ec64a0bc7eabb45783e7031729c5b1ff37821cbd.tar.gz
main: also free memory on errors
* src/derives.c (derives_free): Beware of NULL. * src/main.c (main): Let the 'finish' label include memory release.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 06bcb1c5..ab0229f5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -207,6 +207,8 @@ main (int argc, char *argv[])
timevar_pop (tv_parser);
}
+ finish:
+
timevar_push (tv_free);
nullable_free ();
derives_free ();
@@ -228,8 +230,6 @@ main (int argc, char *argv[])
if (trace_flag & trace_bitsets)
bitset_stats_dump (stderr);
- finish:
-
/* Stop timing and print the times. */
timevar_stop (tv_total);
timevar_print (stderr);