!67 [sync] PR-64: udiskslinuxblock: Fix leaking string

From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
This commit is contained in:
openeuler-ci-bot 2024-08-31 01:41:52 +00:00 committed by Gitee
commit 094fcd37d3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 43e30c01c709412b1a905f3997b63017c205471a Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Tue, 13 Aug 2024 17:24:28 +0800
Subject: [PATCH] udiskslinuxblock: Fix leaking string
---
src/udiskslinuxblock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
index 829dd5f..be5c340 100644
--- a/src/udiskslinuxblock.c
+++ b/src/udiskslinuxblock.c
@@ -1244,6 +1244,7 @@ udisks_linux_block_update (UDisksLinuxBlock *block,
bitlk_info = bd_crypto_bitlk_info (device_file, &error);
if (bitlk_info)
{
+ g_free (s);
s = g_strdup (bitlk_info->uuid);
bd_crypto_bitlk_info_free (bitlk_info);
}
--
2.33.0

View File

@ -19,7 +19,7 @@
Name: udisks2
Summary: Disk Manager
Version: 2.10.1
Release: 3
Release: 4
License: GPL-2.0+ and LGPL-2.0+
Group: System Environment/Libraries
URL: https://github.com/storaged-project/udisks
@ -27,6 +27,7 @@ Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{v
Patch0001: 0001-mdraid-Expose-consistency_policy-sysfs-value.patch
Patch0002: 0002-udiskslinuxmanager-use-dbus-interface-after-free.patch
Patch0003: 0003-udiskslinuxblock-Fix-leaking-string.patch
BuildRequires: make
BuildRequires: glib2-devel >= %{glib2_version}
@ -317,6 +318,9 @@ fi
%changelog
* Tue Aug 13 2024 cenhuilin <cenhuilin@kylinos.cn> - 2.10.1-4
- udiskslinuxblock: Fix leaking string
* Tue Jun 18 2024 cenhuilin <cenhuilin@kylinos.cn> - 2.10.1-3
- udiskslinuxmanager:use dbus interface after free