aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-08-30 13:23:29 +0300
committerArnold D. Robbins <arnold@skeeve.com>2019-08-30 13:23:29 +0300
commitc15d2db3ce7ea49741d8792190f9212842db86ec (patch)
tree9d7e598ef44874cd8d5d8af5450dc41b3af3abca
parent134f9d04acffcd68c298a7f41419b0620212595e (diff)
downloadegawk-c15d2db3ce7ea49741d8792190f9212842db86ec.tar.gz
egawk-c15d2db3ce7ea49741d8792190f9212842db86ec.tar.bz2
egawk-c15d2db3ce7ea49741d8792190f9212842db86ec.zip
Another memory issue fix.
-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);