Fix a leak in the tests
This commit is contained in:
parent
1ee66a9041
commit
bec8c4ce4e
27
Fix-a-leak-in-the-tests.patch
Normal file
27
Fix-a-leak-in-the-tests.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From baf95e6258125dc787363c9eb2e1e9f5686e399c Mon Sep 17 00:00:00 2001
|
||||
From: Reuben Thomas <rrt@sc3d.org>
|
||||
Date: Thu, 11 Apr 2024 22:48:29 +0200
|
||||
Subject: [PATCH] Fix a leak in the tests
|
||||
|
||||
---
|
||||
tests/EnchantTestFixture.h | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/EnchantTestFixture.h b/tests/EnchantTestFixture.h
|
||||
index 160256f..9909e58 100644
|
||||
--- a/tests/EnchantTestFixture.h
|
||||
+++ b/tests/EnchantTestFixture.h
|
||||
@@ -69,7 +69,9 @@ struct EnchantTestFixture
|
||||
{
|
||||
GSList *config_dirs = enchant_get_conf_dirs();
|
||||
const char *pkgdatadir = (char *)g_slist_nth(config_dirs, 0)->data;
|
||||
- return std::string(pkgdatadir);
|
||||
+ auto res = std::string(pkgdatadir);
|
||||
+ g_slist_free_full(config_dirs, g_free);
|
||||
+ return res;
|
||||
}
|
||||
|
||||
static void DeleteDirAndFiles(const std::string& dir)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
Name: enchant2
|
||||
Version: 2.6.7
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Generic spell checking library
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/AbiWord/enchant
|
||||
Source0: https://github.com/AbiWord/enchant/releases/download/v%{version}/enchant-%{version}.tar.gz
|
||||
Patch0: Add-with-hunspell-dir-parameters.patch
|
||||
Patch1: Parameter-h-correction.patch
|
||||
Patch2: Fix-a-leak-in-the-tests.patch
|
||||
|
||||
BuildRequires: automake autoconf libtool gcc-c++ glib2-devel aspell-devel hunspell-devel libvoikko-devel
|
||||
|
||||
@ -99,6 +100,9 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g;
|
||||
%doc %{_defaultdocdir}/%{name}/enchant-lsmod-2.html
|
||||
|
||||
%changelog
|
||||
* Thu May 9 2024 dongjiao <dongjiao@kylinos.cn> - 2.6.7-4
|
||||
- Fix a leak in the tests
|
||||
|
||||
* Wed Apr 3 2024 zhangxianting <zhangxianting@uniontech.com> - 2.6.7-3
|
||||
- parament -h reture value be 0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user