summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2015-05-15 09:53:34 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2015-05-15 09:53:34 -0400
commitdfc4b219457bc6180abfa7ea8575af3c450c9477 (patch)
tree4eb9fedb32c35b138b1d6ded0010b117f3e0ea60
parent5947a3b6d75062b11d5e68b8bbfb5250e703ae26 (diff)
downloadgawk-dfc4b219457bc6180abfa7ea8575af3c450c9477.tar.gz
Fix minor memory leak during creation of PROCINFO["identifiers"] array.
-rw-r--r--ChangeLog5
-rw-r--r--symbol.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6850a33d..3a38eb5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-15 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * symbol.c (load_symbols): Plug minor memory leak by calling unref(tmp)
+ on "identifiers" string after assoc_lookup is done with it.
+
2015-05-05 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (yylex): Yet Another Fix for parsing bracket
diff --git a/symbol.c b/symbol.c
index 845d3797..84574e7b 100644
--- a/symbol.c
+++ b/symbol.c
@@ -560,6 +560,7 @@ load_symbols()
memset(sym_array, '\0', sizeof(NODE)); /* PPC Mac OS X wants this */
null_array(sym_array);
+ unref(tmp);
unref(*aptr);
*aptr = sym_array;