mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
bc10fbd49e
segment nodes allocated with mrbc_malloc were leaked if gen_string raised an exception via longjmp. fix by avoiding allocation entirely: temporarily modify tree structure by saving and clearing cdr pointer, call gen_string, then restore cdr. no memory is allocated so nothing leaks even on longjmp. Co-authored-by: Claude <noreply@anthropic.com>