[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8325] parsetexi avoid memory leak in indices
From: |
gavinsmith0123 |
Subject: |
[8325] parsetexi avoid memory leak in indices |
Date: |
Thu, 18 Oct 2018 08:47:06 -0400 (EDT) |
Revision: 8325
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8325
Author: gavin
Date: 2018-10-18 08:47:06 -0400 (Thu, 18 Oct 2018)
Log Message:
-----------
parsetexi avoid memory leak in indices
Modified Paths:
--------------
trunk/tp/Texinfo/XS/parsetexi/api.c
trunk/tp/Texinfo/XS/parsetexi/indices.c
Modified: trunk/tp/Texinfo/XS/parsetexi/api.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/api.c 2018-10-18 11:55:00 UTC (rev 8324)
+++ trunk/tp/Texinfo/XS/parsetexi/api.c 2018-10-18 12:47:06 UTC (rev 8325)
@@ -46,6 +46,8 @@
reset_parser (void)
{
debug ("!!!!!!!!!!!!!!!! RESETTING THE PARSER !!!!!!!!!!!!!!!!!!!!!");
+
+ wipe_indices (); /* do before destroying tree to check route_not_in_tree */
if (Root)
{
destroy_element_and_children (Root);
@@ -54,7 +56,6 @@
wipe_user_commands ();
wipe_values ();
wipe_macros ();
- wipe_indices ();
init_index_commands ();
wipe_errors ();
reset_context_stack ();
Modified: trunk/tp/Texinfo/XS/parsetexi/indices.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/indices.c 2018-10-18 11:55:00 UTC (rev
8324)
+++ trunk/tp/Texinfo/XS/parsetexi/indices.c 2018-10-18 12:47:06 UTC (rev
8325)
@@ -134,8 +134,8 @@
for (i = 0; i < idx->index_number; i++)
{
ie = &idx->index_entries[i];
- //destroy_element (ie->content);
- // TODO - check if above is required
+ if (ie->content->parent_type == route_not_in_tree)
+ destroy_element (ie->content);
}
free (idx->name);
free (idx->index_entries);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8325] parsetexi avoid memory leak in indices,
gavinsmith0123 <=