[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, feature/mdim-restart, updated. gawk-4.1.0-4768-g4ac52
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, feature/mdim-restart, updated. gawk-4.1.0-4768-g4ac52d68 |
Date: |
Sun, 22 May 2022 11:13:40 -0400 (EDT) |
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, feature/mdim-restart has been updated
via 4ac52d685c3b6917c088b390b632195fcf68219c (commit)
from 3c95d116d1adf70e8656d4fdfcecb47ed2a2aca8 (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=4ac52d685c3b6917c088b390b632195fcf68219c
commit 4ac52d685c3b6917c088b390b632195fcf68219c
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Sun May 22 11:13:14 2022 -0400
Fix memory leak converting Node_elem_new to array.
diff --git a/ChangeLog b/ChangeLog
index 71642f60..4fe7e930 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-05-22 Arnold D. Robbins <arnold@skeeve.com>
+
+ * array.c (force_array): When converting Node_elem_new to an array,
+ release the string storage. Thanks to valgrind, by way of Andrew
+ Schorr, for the report.
+
2022-05-11 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_list): Typo fix in a comment.
diff --git a/array.c b/array.c
index aed8fa3e..ed8e3f3e 100644
--- a/array.c
+++ b/array.c
@@ -334,8 +334,11 @@ force_array(NODE *symbol, bool canfatal)
}
switch (symbol->type) {
- case Node_var_new:
case Node_elem_new:
+ efree(symbol->stptr);
+ symbol->stlen = 0;
+ /* fall through */
+ case Node_var_new:
symbol->xarray = NULL; /* make sure union is as it should be */
null_array(symbol);
symbol->parent_array = NULL; /* main array has no parent */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
array.c | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, feature/mdim-restart, updated. gawk-4.1.0-4768-g4ac52d68,
Arnold Robbins <=