[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3597-g99e184
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3597-g99e184d |
Date: |
Mon, 14 Jan 2019 09:56:36 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, master has been updated
via 99e184df5e808dd4de24b3e41c724bf9b00b9bb4 (commit)
from 663aff4ae012468c54d2e994e839d0e75210ef80 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=99e184df5e808dd4de24b3e41c724bf9b00b9bb4
commit 99e184df5e808dd4de24b3e41c724bf9b00b9bb4
Author: Andrew J. Schorr <address@hidden>
Date: Mon Jan 14 09:56:14 2019 -0500
Fix memory leak in new do_typeof optional array arg.
diff --git a/ChangeLog b/ChangeLog
index 5f04e8a..da93370 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-14 Andrew J. Schorr <address@hidden>
+
+ * builtin.c (do_typeof): Fix memory leak when populating the
+ optional array, and make sure to call the astore method.
+
2019-01-09 Andrew J. Schorr <address@hidden>
* awkgram.y (tokentab): Indicate that typeof may take 2 arguments.
diff --git a/builtin.c b/builtin.c
index c92a598..9cf817a 100644
--- a/builtin.c
+++ b/builtin.c
@@ -4090,6 +4090,9 @@ do_typeof(int nargs)
NODE **lhs = assoc_lookup(dbg, sub);
unref(*lhs);
*lhs = make_string(arg->array_funcs->name,
strlen(arg->array_funcs->name));
+ if (dbg->astore != NULL)
+ (*dbg->astore)(dbg, sub);
+ unref(sub);
}
break;
case Node_val:
@@ -4125,6 +4128,9 @@ do_typeof(int nargs)
NODE **lhs = assoc_lookup(dbg, sub);
unref(*lhs);
*lhs = make_string(s, strlen(s));
+ if (dbg->astore != NULL)
+ (*dbg->astore)(dbg, sub);
+ unref(sub);
}
break;
case Node_var_new:
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
builtin.c | 6 ++++++
2 files changed, 11 insertions(+)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3597-g99e184d,
Andrew J. Schorr <=