Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/historical/nawk/dist Fix memory leak in gensub()
details: https://anonhg.NetBSD.org/src/rev/d6d83ecf9208
branches: trunk
changeset: 790934:d6d83ecf9208
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Oct 27 10:06:01 2013 +0000
description:
Fix memory leak in gensub()
diffstat:
external/historical/nawk/dist/run.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r e4ff1d459144 -r d6d83ecf9208 external/historical/nawk/dist/run.c
--- a/external/historical/nawk/dist/run.c Sun Oct 27 10:05:15 2013 +0000
+++ b/external/historical/nawk/dist/run.c Sun Oct 27 10:06:01 2013 +0000
@@ -2074,6 +2074,7 @@
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 {
Home |
Main Index |
Thread Index |
Old Index