texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_p


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command): always free entry_tree, found with valgrind.
Date: Sun, 07 Jan 2024 12:29:51 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 48b5ee8dde * tp/Texinfo/XS/convert/convert_html.c 
(convert_printindex_command): always free entry_tree, found with valgrind.
48b5ee8dde is described below

commit 48b5ee8dde003555871e35f079646ccd991cbb94
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 7 18:29:50 2024 +0100

    * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command):
    always free entry_tree, found with valgrind.
---
 ChangeLog                            | 5 +++++
 tp/Texinfo/ParserNonXS.pm            | 3 ++-
 tp/Texinfo/XS/convert/convert_html.c | 7 +++++--
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 696b804918..ac9dd5b8ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-07  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command):
+       always free entry_tree, found with valgrind.
+
 2024-01-07  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_convert_printindex_command),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index c4f30538f1..db1a53a53a 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -8819,7 +8819,8 @@ If an index entry @-command, such as C<@cindex>, or a 
C<@subentry> contains
 a C<@sortas> command, I<sortas> holds the C<@sortas> command content
 formatted as plain text.
 
-I<subentry> links to the next level C<@subentry> element.
+I<subentry> links to the next level C<@subentry> element.  I<subentry_parent>
+liskes to the previous level element.
 
 Index entry @-command (but not C<@subentry>) can also have I<seentry>
 and I<seealso> keys that link to the corresponding @-commands elements.
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index dfb8937ca2..71b3b778b7 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -12728,7 +12728,6 @@ convert_printindex_command (CONVERTER *self, const enum 
command_id cmd,
               if (last_entry_level > 0)
                 {
                   remove_element_from_list (&self->tree_to_build, entry_tree);
-                  destroy_element (entry_tree);
                 }
               free (convert_info);
 
@@ -12896,10 +12895,14 @@ convert_printindex_command (CONVERTER *self, const 
enum command_id cmd,
                 }
             }
 
-          destroy_element (entry_ref_tree);
+          if (last_entry_level > 0)
+            destroy_element (entry_tree);
+
           if (other_subentries_tree)
             free_comma_index_subentries_tree (other_subentries_tree);
 
+          destroy_element (entry_ref_tree);
+
           if (*formatted_index_entry_nr > 1)
             free (multiple_pass_str);
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]