ruby-changes:53824
From: duerst <ko1@a...>
Date: Wed, 28 Nov 2018 06:00:12 +0900 (JST)
Subject: [ruby-changes:53824] duerst:r66042 (trunk): make sure all nodes are correctly freed in create_property_node()
duerst 2018-11-28 06:00:06 +0900 (Wed, 28 Nov 2018) New Revision: 66042 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66042 Log: make sure all nodes are correctly freed in create_property_node() We make sure that the newly created tree and all remaining nodes passed in in the node_array are freed. Modified files: trunk/regparse.c Index: regparse.c =================================================================== --- regparse.c (revision 66041) +++ regparse.c (revision 66042) @@ -5770,6 +5770,10 @@ create_sequence_node(Node **np, Node **n https://github.com/ruby/ruby/blob/trunk/regparse.c#L5770 while (--i >= 0) { *np = node_new_list(node_array[i], tmp); if (IS_NULL(*np)) { + while (i >= 0) { + onig_node_free(node_array[i]); + node_array[i--] = NULL_NODE; + } onig_node_free(tmp); return ONIGERR_MEMORY; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/