diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | interpret.h | 4 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2019-08-30 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * interpret.h (r_interpret): For Op_match_rec, unref if a + dynamic regexp. Fixes another memory issue. See the thread starting + at https://lists.gnu.org/archive/html/bug-gawk/2019-08/msg00023.html. + 2019-08-29 Arnold D. Robbins <arnold@skeeve.com> Restore a modified version of the change of diff --git a/interpret.h b/interpret.h index 3215833e..6cfff3a6 100644 --- a/interpret.h +++ b/interpret.h @@ -1065,6 +1065,10 @@ match_re: if (op != Op_match_rec) { decr_sp(); DEREF(t1); + if (m->type == Node_dynregex) { + DEREF(m->re_exp); + m->re_exp = NULL; + } } r = node_Boolean[di]; UPREF(r); |