[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 5 May 2024 03:18:21 -0400 (EDT) |
branch: master
commit 2476dabff0dc0af3be3b5b5214d1cbd7449a4ca0
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat May 4 23:42:10 2024 +0200
* tp/Texinfo/XS/convert/ConvertXS.xs
(get_converter_indices_sorted_by_index): initialize variables.
* tp/Texinfo/XS/main/manipulate_indices.c (destroy_collator):
call freelocale to deallocate resources associated with the locale
created with newlocale.
---
ChangeLog | 9 +++++++++
tp/Texinfo/XS/convert/ConvertXS.xs | 4 ++--
tp/Texinfo/XS/main/manipulate_indices.c | 4 ++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3480243220..8120890c27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-05-04 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/ConvertXS.xs
+ (get_converter_indices_sorted_by_index): initialize variables.
+
+ * tp/Texinfo/XS/main/manipulate_indices.c (destroy_collator):
+ call freelocale to deallocate resources associated with the locale
+ created with newlocale.
+
2024-05-04 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Plaintext.pm (_convert): add a newline after
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs
b/tp/Texinfo/XS/convert/ConvertXS.xs
index caf738a87e..1a6cccb849 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -249,7 +249,7 @@ get_converter_indices_sorted_by_index (SV *converter_sv)
const INDEX_SORTED_BY_INDEX *index_entries_by_index = 0;
HV *converter_hv;
SV **document_sv;
- char *language;
+ char *language = 0;
CODE:
self = get_sv_converter (converter_sv,
"get_converter_indices_sorted_by_index");
@@ -267,7 +267,7 @@ get_converter_indices_sorted_by_index (SV *converter_sv)
Either Perl code or XS code is used, so this is for consistency
not really for interoperability */
/* set to document "sorted_indices_by_index" */
- HV *language_document_sorted_indices_hv;
+ HV *language_document_sorted_indices_hv = 0;
/* try first to get sorted index cached in document
"sorted_indices_by_index".
Gather the hash to use to cache too in
diff --git a/tp/Texinfo/XS/main/manipulate_indices.c
b/tp/Texinfo/XS/main/manipulate_indices.c
index 26f4745ee3..814cefad0f 100644
--- a/tp/Texinfo/XS/main/manipulate_indices.c
+++ b/tp/Texinfo/XS/main/manipulate_indices.c
@@ -885,6 +885,10 @@ destroy_indices_sortable_entries (
static void
destroy_collator (INDEX_COLLATOR *collator)
{
+ #ifdef HAVE_NEWLOCALE
+ if (collator->type == ctn_locale_collation)
+ freelocale (collator->locale);
+ #endif
free (collator);
}