bug fixmemory leak

This commit is contained in:
orange-snn 2020-03-10 10:52:48 +08:00
parent f2fbb700b2
commit 3b13f57580
2 changed files with 32 additions and 1 deletions

26
icu-fix-memory-leak.patch Normal file
View File

@ -0,0 +1,26 @@
From 35a6cf2313357f9b58e60a000ea3f1d22e21dd65 Mon Sep 17 00:00:00 2001
From: songnannan2 <songnannan2@huawei.com>
Date: Tue, 18 Feb 2020 23:42:45 +0800
Subject: [PATCH] b
---
icu/source/common/uloc_tag.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/icu/source/common/uloc_tag.cpp b/icu/source/common/uloc_tag.cpp
index 87b9f63..6948e14 100644
--- a/source/common/uloc_tag.cpp
+++ b/source/common/uloc_tag.cpp
@@ -1242,7 +1242,8 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
attrBufIdx += (len + 1);
} else {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- goto cleanup;
+ uprv_free(attr);
+ goto cleanup;
}
if (!_addAttributeToList(&attrFirst, attr)) {
--
2.19.1

View File

@ -1,6 +1,6 @@
Name: icu Name: icu
Version: 62.1 Version: 62.1
Release: 2 Release: 3
Summary: International Components for Unicode Summary: International Components for Unicode
License: MIT and UCD and Public Domain License: MIT and UCD and Public Domain
URL: http://site.icu-project.org/ URL: http://site.icu-project.org/
@ -13,6 +13,8 @@ Requires: lib%{name} = %{version}-%{release}
Patch1: gennorm2-man.patch Patch1: gennorm2-man.patch
Patch2: icuinfo-man.patch Patch2: icuinfo-man.patch
Patch6000: icu-fix-memory-leak.patch
%description %description
Tools and utilities for developing with icu. Tools and utilities for developing with icu.
@ -126,6 +128,9 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l
%changelog %changelog
* Tue Mar 10 2020 songnannan <songnannan2@huawei.com> - 62.1-4
- bugfix memory leak
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 62.1-3 * Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 62.1-3
- Type:bugfix - Type:bugfix
- Id:NA - Id:NA