texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sun, 29 Sep 2024 06:16:30 -0400 (EDT)

branch: master
commit 83ff036df6ea20ea42df976de76ba161987378a0
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jun 17 00:31:54 2024 +0200

    * tp/Texinfo/XS/main/output_unit.c (destroy_output_unit): destroy the
    unit_command if the output_unit is a special_unit_variety as in that
    case the element is not in the main document Texinfo tree and will not
    be freed.
---
 ChangeLog                        | 7 +++++++
 tp/Texinfo/XS/main/output_unit.c | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ccfc4fd962..2060e0f552 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,13 @@
        * tp/Texinfo/XS/convert/convert_html.c (html_command_description):
        update for move of cmd to CONTAINER.
 
+2024-06-16  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/output_unit.c (destroy_output_unit): destroy the
+       unit_command if the output_unit is a special_unit_variety as in that
+       case the element is not in the main document Texinfo tree and will not
+       be freed.
+
 2024-06-16  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/output_unit.c (retrieve_output_units)
diff --git a/tp/Texinfo/XS/main/output_unit.c b/tp/Texinfo/XS/main/output_unit.c
index 2169f0e26b..5830423bae 100644
--- a/tp/Texinfo/XS/main/output_unit.c
+++ b/tp/Texinfo/XS/main/output_unit.c
@@ -303,6 +303,10 @@ unsplit (DOCUMENT *document)
 void
 destroy_output_unit (OUTPUT_UNIT *output_unit)
 {
+  /* need to destroy elements associated with special output units
+     as they are not in the document Texinfo tree */
+  if (output_unit->special_unit_variety)
+    destroy_element (output_unit->unit_command);
   free (output_unit->unit_contents.list);
   /* no need to free output_unit->unit_filename as it is a
      reference on output_unit_files list FILE_NAME_PATH_COUNTER



reply via email to

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