ukui-panel: fix incorrect usage of deallocation func

Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
This commit is contained in:
侯红勋 2024-04-15 10:35:55 +08:00
parent 6b02443fdc
commit 59afc15380
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 4f7b0a8c64580ce6272fc27d9bc8f89e1c8a25df 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 10:11:43 +0800
Subject: [PATCH] ukui-panel: fix incorrect usage of deallocation func
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
panel/ukuipanelapplication.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/panel/ukuipanelapplication.cpp b/panel/ukuipanelapplication.cpp
index d69244b..29cfc4b 100644
--- a/panel/ukuipanelapplication.cpp
+++ b/panel/ukuipanelapplication.cpp
@@ -289,8 +289,9 @@ bool UKUIPanelApplication::copyFileToPath(QString sourceDir ,QString toDir, QStr
createFile->remove(toDir+fileName);
}
}//end if
- free(createDir);
- free(createFile);
+
+ delete createDir;
+ delete createFile;
if(!QFile::copy(sourceDir+fileName, toDir+fileName))
{
--
2.43.0

View File

@ -1,6 +1,6 @@
Name: ukui-panel
Version: 3.1.0
Release: 11
Release: 12
Summary: ukui desktop panel
License: LGPL-2.0-or-later and GPL-2.0-or-later and BSD
URL: http://www.ukui.org
@ -13,6 +13,7 @@ Patch04: 0004-fix-the-backlight-of-nightmode-button.patch
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
BuildRequires: cmake
BuildRequires: alsa-lib-devel
@ -68,6 +69,7 @@ Recommends: time-shutdown
%patch05 -p1
%endif
%patch06 -p1
%patch07 -p1
%build
mkdir build && cd build
@ -90,6 +92,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/*
%changelog
* Mon Apr 15 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.0-12
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add 0001-ukui-panel-fix-incorrect-usage-of-deallocation-func.patch
* Thu Sep 07 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-11
- Type:bugfix
- ID:NA