Add patch to fix a double-free
36c5e90469
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
This commit is contained in:
parent
baf3eb10e5
commit
d65da2513b
38
0001-gtk-Fix-another-possible-double-free.patch
Normal file
38
0001-gtk-Fix-another-possible-double-free.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 36c5e90469b36cb0724f45447ae923a6d6ccf348 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Fri, 25 Oct 2019 12:37:44 +0200
|
||||
Subject: [PATCH] gtk: Fix another possible double-free
|
||||
|
||||
The object should only be freed if we're in the cleanup phase, i.e. only
|
||||
in the if-branch of the condition.
|
||||
|
||||
This one was introduced in dc281652.
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 4b840bac..ec8bb68b 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -2518,7 +2518,7 @@ static bool highligh_words_in_textview(int page, GtkTextView *tev, GList *words,
|
||||
while (valid)
|
||||
{
|
||||
g_autofree char *text = NULL;
|
||||
- g_autofree search_item_t *word = NULL;
|
||||
+ search_item_t *word = NULL;
|
||||
|
||||
gtk_tree_model_get(GTK_TREE_MODEL(g_ls_sensitive_list), &iter,
|
||||
SEARCH_COLUMN_TEXT, &text,
|
||||
@@ -2533,6 +2533,8 @@ static bool highligh_words_in_textview(int page, GtkTextView *tev, GList *words,
|
||||
|
||||
if (word == g_current_highlighted_word)
|
||||
g_current_highlighted_word = NULL;
|
||||
+
|
||||
+ free(word);
|
||||
}
|
||||
else
|
||||
{
|
||||
--
|
||||
2.23.0
|
||||
|
@ -15,7 +15,7 @@
|
||||
Summary: Generic library for reporting various problems
|
||||
Name: libreport
|
||||
Version: 2.11.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
URL: https://abrt.readthedocs.org/
|
||||
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
@ -63,6 +63,8 @@ Requires: lz4
|
||||
BuildRequires: sed
|
||||
%endif
|
||||
|
||||
Patch0: 0001-gtk-Fix-another-possible-double-free.patch
|
||||
|
||||
%description
|
||||
Libraries providing API for reporting different problems in applications
|
||||
to different bug targets like Bugzilla, ftp, trac, etc...
|
||||
@ -749,6 +751,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 11 2019 Ernestas Kulik <ekulik@redhat.com> - 2.11.2-2
|
||||
- Add patch to fix a double-free
|
||||
|
||||
* Wed Oct 23 2019 Matěj Grabovský <mgrabovs@redhat.com> 2.11.2-1
|
||||
- gtk: Improve memory management
|
||||
- gtk: Prevent memory leak
|
||||
|
Loading…
Reference in New Issue
Block a user