summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2024-11-20 23:06:34 -0800
committerJohn Hawthorn <[email protected]>2024-11-22 19:25:01 -0800
commita8ebc596d6c4df190df269668dc0168e96fff0fb (patch)
tree0de410a24a018ef28143ade928257e21b71206fd
parentb4d13fac3dd5420475aa1e14fdad8137da7e3ee0 (diff)
Free parse result under -c
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12148
-rw-r--r--ruby.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index eca0382466..61de5cdcbe 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2566,7 +2566,10 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
if (dump & DUMP_BIT(syntax)) {
printf("Syntax OK\n");
dump &= ~DUMP_BIT(syntax);
- if (!dump) return Qtrue;
+ if (!dump) {
+ dispose_result();
+ return Qtrue;
+ }
}
if (dump & DUMP_BIT(parsetree)) {