commit | 85fc5801281d38897b652b298d35074b7b73ed3a | [log] [tgz] |
---|---|---|
author | Tom Tromey <tom@tromey.com> | Wed Feb 15 16:09:35 2023 -0700 |
committer | Alan Modra <amodra@gmail.com> | Sun Feb 19 13:17:41 2023 +1030 |
tree | ca0d82b6478f18654299a5f759adec85610d66e6 | |
parent | cd414f90c340145d811259d10e84b126d73777d0 [diff] |
Avoid memory leak in chew An earlier patch of mine introduced a memory leak in chew. The bug was that the new "variable" word didn't free the following word. This patch fixes it by arranging to transfer ownership of the name to the variable itself. * doc/chew.c (add_variable): New function, from add_intrinsic_variable. (add_intrinsic_variable): Call add_variable. (compile): Call add_variable.