!48 [sync] PR-47: abrt-dbus do not try to free session data twice

From: @openeuler-sync-bot 
Reviewed-by: @starlet-dx 
Signed-off-by: @starlet-dx
This commit is contained in:
openeuler-ci-bot 2025-03-21 07:31:16 +00:00 committed by Gitee
commit 32e4ec9293
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From a6297858575780b9ed3d14cc42983348924d6048 Mon Sep 17 00:00:00 2001
From: Michal Srb <michal@redhat.com>
Date: Tue, 5 Oct 2021 15:53:48 +0200
Subject: [PATCH] abrt-dbus: do not try to free session data twice
We free session data in on_g_signal() function, which is also
invoked when client disappears. Therefore, we don't need to register the
same free function in g_bus_watch_name_on_connection().
glib2 2.69.2 changed (fixed?) how/when g_bus_watch_name_on_connection()
calls the provided free function and it uncovered this problem in abrt-dbus.
See rhbz#1997315 for more details.
Signed-off-by: Michal Srb <michal@redhat.com>
---
src/dbus/abrt_problems2_service.c | 2 +-
1 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/dbus/abrt_problems2_service.c b/src/dbus/abrt_problems2_service.c
index 8d543f443..004c7aeb2 100644
--- a/src/dbus/abrt_problems2_service.c
+++ b/src/dbus/abrt_problems2_service.c
@@ -571,7 +571,7 @@ static AbrtP2Object *session_object_register(AbrtP2Service *service,
obj->owner_watcher_id = g_bus_watch_name_on_connection(connection, caller,
G_BUS_NAME_WATCHER_FLAGS_NONE,
NULL, abrt_p2_service_on_session_owner_vanished,
- obj, (GDestroyNotify)abrt_p2_object_destroy);
+ obj, NULL);
return obj;
}

View File

@ -1,12 +1,13 @@
Name: abrt
Version: 2.14.6
Release: 2
Release: 3
Summary: A tool for automatic bug detection and reporting
License: GPL-2.0 and GPL-2.0+
URL: https://github.com/abrt/abrt/
Source: https://github.com/abrt/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0001-Use-lazy-imports-in-abrt_exception_handler3.patch
Patch1: 0002-abrt-dbus-do-not-try-to-free-session-data-twice.patch
BuildRequires: git-core dbus-devel hostname gtk3-devel glib2-devel >= 2.43.4 rpm-devel >= 4.6
BuildRequires: desktop-file-utils libnotify-devel gettext libxml2-devel intltool libtool
@ -596,6 +597,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_mandir}/man*/*
%changelog
* Fri Mar 21 2025 liyanan <liyanan61@h-partners.com> - 2.14.6-3
- abrt-dbus: do not try to free session data twice
* Tue Aug 13 2024 liyuzhe <liyuzhe@cqsoftware.com.cn> - 2.14.6-2
- Added 'Buildarch: noarch' to the help subpackage