aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--interpret.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index edf4bf57..5769a718 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);