[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_comm
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_command_filename): set file number for regular output units only. |
Date: |
Sat, 30 Dec 2023 06:39:48 -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 ad6792f415 * tp/Texinfo/XS/convert/convert_html.c
(html_command_filename): set file number for regular output units only.
ad6792f415 is described below
commit ad6792f4150f5de1fb69dc16a3a04c33db1300f4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Dec 30 12:39:47 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c (html_command_filename): set
file number for regular output units only.
* tp/Texinfo/XS/convert/convert_html.c (convert_footnote_command)
(html_image_file_location_name), tp/Texinfo/XS/convert/converter.c
(next_for_tieaccent): free variables (found with valgrind).
---
ChangeLog | 9 +++++++++
tp/Texinfo/XS/convert/convert_html.c | 17 ++++++++++++-----
tp/Texinfo/XS/convert/converter.c | 1 +
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba9c963620..c939717e8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-12-30 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_command_filename): set
+ file number for regular output units only.
+
+ * tp/Texinfo/XS/convert/convert_html.c (convert_footnote_command)
+ (html_image_file_location_name), tp/Texinfo/XS/convert/converter.c
+ (next_for_tieaccent): free variables (found with valgrind).
+
2023-12-30 Patrice Dumas <pertusus@free.fr>
Fix memory leaks (found with valgrind)
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 8b07e37264..1f35b12b9e 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -3326,12 +3326,14 @@ html_command_filename (CONVERTER *self, const ELEMENT
*command)
if (root_unit && root_unit->output_unit
&& root_unit->output_unit->unit_filename)
{
- size_t file_index
- = self->output_unit_file_indices[root_unit->output_unit->index];
- target_info->file_number_name.file_number
- = file_index +1;
target_info->file_number_name.filename
= root_unit->output_unit->unit_filename;
+ if (root_unit->output_unit->unit_type == OU_unit)
+ {
+ size_t file_index
+ = self->output_unit_file_indices[root_unit->output_unit->index];
+ target_info->file_number_name.file_number = file_index +1;
+ }
}
target_info->filename_set = 1;
@@ -8601,7 +8603,10 @@ convert_footnote_command (CONVERTER *self, const enum
command_id cmd,
/* happens for bogus footnotes */
if (!footnote_id)
- return;
+ {
+ free (footnote_mark);
+ return;
+ }
/* ID for linking back to the main text from the footnote. */
footnote_docid = html_footnote_location_target (self, element);
@@ -8828,6 +8833,8 @@ html_image_file_location_name (CONVERTER *self, const
enum command_id cmd,
&result->image_path_encoding);
if (image_file)
result->image_extension = dot_ext;
+ else
+ free (dot_ext);
}
else
result->image_extension = strdup (extension);
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index cc5754b442..5d65130a17 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -782,6 +782,7 @@ next_for_tieaccent (const char *text, const char **next)
iconveh_question_mark);
ucs4_t first_char;
u8_next (&first_char, encoded_u8);
+ free (encoded_u8);
if (uc_is_general_category (first_char, UC_CATEGORY_L)
/* ASCII digits */
|| (first_char >= 0x0030 && first_char <= 0x0039))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_command_filename): set file number for regular output units only.,
Patrice Dumas <=