[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Fri, 20 Oct 2023 16:46:29 -0400 (EDT) |
branch: master
commit 37230747bb60f81984e6844bec1dce70029350f4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Oct 20 22:41:53 2023 +0200
* tp/Texinfo/XS/convert/convert_html.c
(prepare_index_entries_targets): destroy normalize_index_element
element.
* tp/Texinfo/XS/convert/converter.c (set_global_document_commands),
tp/Texinfo/XS/main/utils.c (set_informative_command_value): strdup
char * values set in option_ref. Also in set_informative_command_value
free before resetting.
---
ChangeLog | 11 +++++++++++
tp/Texinfo/XS/convert/convert_html.c | 2 ++
tp/Texinfo/XS/convert/converter.c | 5 +++--
tp/Texinfo/XS/main/utils.c | 5 ++++-
4 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 753c714283..acf54a2cfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-10-19 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c
+ (prepare_index_entries_targets): destroy normalize_index_element
+ element.
+
+ * tp/Texinfo/XS/convert/converter.c (set_global_document_commands),
+ tp/Texinfo/XS/main/utils.c (set_informative_command_value): strdup
+ char * values set in option_ref. Also in set_informative_command_value
+ free before resetting.
+
2023-10-20 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/XS/xspara.c (xspara_add_text):
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 5f3f193dc3..a7ecc38ad0 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -1431,6 +1431,8 @@ prepare_index_entries_targets (CONVERTER *self)
normalized_index
= normalize_transliterate_texinfo (normalize_index_element,
(self->conf->TEST > 0));
+
+ destroy_element (normalize_index_element);
if (subentries_tree)
free_comma_index_subentries_tree (subentries_tree);
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index cec0452c61..3783dd4836 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -172,7 +172,7 @@ set_global_document_commands (CONVERTER *converter,
else
{
free (*(option_ref->char_ref));
- *(option_ref->char_ref) = option_value->char_value;
+ *(option_ref->char_ref) = strdup (option_value->char_value);
}
free (option_ref);
free (option_value);
@@ -206,7 +206,8 @@ set_global_document_commands (CONVERTER *converter,
else
{
free (*(option_ref->char_ref));
- *(option_ref->char_ref) = option_value->char_value;
+ *(option_ref->char_ref)
+ = strdup (option_value->char_value);
}
free (option_ref);
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index a065c0a6c8..402ad94e55 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -919,7 +919,10 @@ set_informative_command_value (CONVERTER *self, ELEMENT
*element)
if (option_ref->type == GO_int)
*(option_ref->int_ref) = strtoul (value, NULL, 10);
else
- *(option_ref->char_ref) = value;
+ {
+ free (*(option_ref->char_ref));
+ *(option_ref->char_ref) = strdup (value);
+ }
free (option_ref);
}
}