Module Name: src
Committed By: mlelstv
Date: Sun Oct 27 10:06:01 UTC 2013
Modified Files:
src/external/historical/nawk/dist: run.c
Log Message:
Fix memory leak in gensub()
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/historical/nawk/dist/run.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/historical/nawk/dist/run.c
diff -u src/external/historical/nawk/dist/run.c:1.6 src/external/historical/nawk/dist/run.c:1.7
--- src/external/historical/nawk/dist/run.c:1.6 Sat Dec 29 02:44:26 2012
+++ src/external/historical/nawk/dist/run.c Sun Oct 27 10:06:01 2013
@@ -2074,6 +2074,7 @@ Cell *gensub(Node **a, int nnn) /* globa
x = execute(a[4]); /* source string */
t = getsval(x);
res = copycell(x); /* target string - initially copy of source */
+ res->csub = CTEMP; /* result values are temporary */
if (a[0] == 0) /* 0 => a[1] is already-compiled regexpr */
pfa = (fa *) a[1]; /* regular expression */
else {