!9 mate-dictionary: fix memory leak and fix build error in openeuler

From: @longcheng01 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
This commit is contained in:
openeuler-ci-bot 2022-08-05 07:09:28 +00:00 committed by Gitee
commit 689fccf71c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 29 additions and 5 deletions

View File

@ -0,0 +1,21 @@
diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c
index 49a35e9..8033d24 100644
--- a/mate-dictionary/libgdict/gdict-defbox.c
+++ b/mate-dictionary/libgdict/gdict-defbox.c
@@ -200,6 +200,8 @@ gdict_defbox_dispose (GObject *gobject)
priv->regular_cursor = NULL;
}
+ g_clear_pointer (&priv->word, g_free);
+
G_OBJECT_CLASS (gdict_defbox_parent_class)->dispose (gobject);
}
@@ -2548,6 +2550,7 @@ gdict_defbox_lookup (GdictDefbox *defbox,
G_CALLBACK (error_cb),
defbox);
+ g_free (priv->word);
priv->word = g_strdup (word);
g_object_notify (G_OBJECT (defbox), "word");

View File

@ -15,7 +15,7 @@
Name: mate-utils
Version: %{branch}.0
%if 0%{?rel_build}
Release: 2
Release: 4
%else
Release: 0.11%{?git_rel}
%endif
@ -29,13 +29,12 @@ URL: http://mate-desktop.org
# Source for snapshot-builds.
%{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
#kylin
Patch0: 0000-draw-mask-for-whole-screen-except-the-selection-area-15cc4fa9.patch
Patch1: 0001-feature-mate-system-log-add-X-System-Server-category-51959949.patch
Patch2: 0002-Remove-the-system-log-viewer-from-the-start-menu-6a94dfb1.patch
Patch3: 0003-change-chinese-translation-be748614.patch
Patch4: 0004-fix-control-center-fix-mate-system-log-is-not-displa-9cfd8ed4.patch
#end kylin
Patch5: 0005-mate-dictionary-fix-memory-leak.patch
BuildRequires: desktop-file-utils
BuildRequires: e2fsprogs-devel
@ -51,9 +50,7 @@ BuildRequires: mesa-libGL-devel
BuildRequires: popt-devel
BuildRequires: usermode
BuildRequires: yelp-tools
%if 0%{?fedora} && 0%{?fedora} >= 29
BuildRequires: gcc-c++
%endif
Requires: mate-dictionary = %{version}-%{release}
Requires: mate-screenshot = %{version}-%{release}
@ -266,6 +263,12 @@ desktop-file-install \
%changelog
* Thu Jul 28 2022 longcheng <longcheng@kylinos.com.cn> - 1.24.0-4
- KYOS-B: fix build error in openEuler
* Thu Jul 7 2022 yinyongkang <yinyongkang@kylinos.cn> - 1.24.0-3
- mate-dictionary: fix memory leak
* Thu Jul 07 2022 longcheng <longcheng@kylinos.com.cn> - 1.24.0-2
- KYOS-F: draw mask for whole screen except the selection area
- KYOS-F: add X-System-Server category for mate-system-log