!80 fix a memory leak

From: @hou-hongxun 
Reviewed-by: @dou33 
Signed-off-by: @dou33
This commit is contained in:
openeuler-ci-bot 2024-05-06 06:13:31 +00:00 committed by Gitee
commit 7f369e5192
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 033cecc576749ca7a542efccdcdefb29c1f3ef69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Mon, 15 Apr 2024 11:12:34 +0800
Subject: [PATCH] ukui-panel: fix a memory leak problem
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
panel/ukuipanel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panel/ukuipanel.cpp b/panel/ukuipanel.cpp
index 93efa54..e3fa7a5 100644
--- a/panel/ukuipanel.cpp
+++ b/panel/ukuipanel.cpp
@@ -294,7 +294,7 @@ UKUIPanel::UKUIPanel(const QString &configGroup, UKUi::Settings *settings, QWidg
styleAdjust();
qDebug()<<"Panel :: UKuiPanel finished";
- UKuiPanelInformation* dbus=new UKuiPanelInformation;
+ UKuiPanelInformation* dbus=new UKuiPanelInformation(this);
new PanelAdaptor(dbus);
QDBusConnection con=QDBusConnection::sessionBus();
if(!con.registerService("org.ukui.panel") ||
--
2.43.0

View File

@ -1,6 +1,6 @@
Name: ukui-panel
Version: 3.1.0
Release: 12
Release: 13
Summary: ukui desktop panel
License: LGPL-2.0-or-later and GPL-2.0-or-later and BSD
URL: http://www.ukui.org
@ -14,6 +14,7 @@ Patch05: disable-Suspend-and-Sleep-of-ukui-panel.patch
%endif
Patch06: Modify-file-permissions.patch
Patch07: 0001-ukui-panel-fix-incorrect-usage-of-deallocation-func.patch
Patch08: 0001-ukui-panel-fix-a-memory-leak-problem.patch
BuildRequires: cmake
BuildRequires: alsa-lib-devel
@ -70,6 +71,7 @@ Recommends: time-shutdown
%endif
%patch06 -p1
%patch07 -p1
%patch08 -p1
%build
mkdir build && cd build
@ -92,6 +94,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/*
%changelog
* Tue Apr 16 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.0-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add 0001-ukui-panel-fix-a-memory-leak-problem.patch
* Mon Apr 15 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.0-12
- Type:bugfix
- ID:NA