aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--field.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ecec421..1f18948c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2016-07-05 Andrew J. Schorr <aschorr@telemetry-investments.com>
+ * field.c (rebuild_record): Need to set MALLOC flag if we allocate
+ memory for a residual field node with valref > 1.
+
+2016-07-05 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
* field.c (rebuild_record): Do not bother to create new field nodes
to replace malloc'ed nodes when rebuilding $0.
diff --git a/field.c b/field.c
index 308f33cd..39b4f966 100644
--- a/field.c
+++ b/field.c
@@ -218,6 +218,7 @@ rebuild_record()
emalloc(r->stptr, char *, r->stlen + 1, "rebuild_record");
memcpy(r->stptr, cops, r->stlen);
r->stptr[r->stlen] = '\0';
+ r->flags |= MALLOC;
}
n->stptr = cops;