udisk2: backport upstream patches-epoch1

udisk2: backport upstream patches-epoch1

Signed-off-by: Zhiqiang Liu <lzhq28@mail.ustc.edu.cn>
This commit is contained in:
Zhiqiang Liu 2020-07-27 16:21:57 +08:00
parent 00c449679a
commit 903efda19b
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From e30be251c101ca17e16648f703af224459601498 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Wed, 27 May 2020 14:16:44 +0200
Subject: [PATCH 349/363] udiskslinuxmountoptions: Prevent a memory leak
Absolutely improbable scenario though.
---
src/udiskslinuxmountoptions.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/udiskslinuxmountoptions.c b/src/udiskslinuxmountoptions.c
index 1071e29a..c9368560 100644
--- a/src/udiskslinuxmountoptions.c
+++ b/src/udiskslinuxmountoptions.c
@@ -259,12 +259,12 @@ compute_mount_options_for_fs_type (UDisksDaemon *daemon,
config_manager = udisks_daemon_get_config_manager (daemon);
- fsmo = g_malloc0 (sizeof (FSMountOptions));
- fsmo_any = g_malloc0 (sizeof (FSMountOptions));
-
/* Builtin options, two-level hashtable */
builtin_opts = g_object_get_data (G_OBJECT (daemon), "mount-options");
g_return_val_if_fail (builtin_opts != NULL, NULL);
+
+ fsmo = g_malloc0 (sizeof (FSMountOptions));
+ fsmo_any = g_malloc0 (sizeof (FSMountOptions));
compute_block_level_mount_options (builtin_opts, block, fstype, fsmo, fsmo_any);
/* Global config file overrides, two-level hashtable */
--
2.21.1 (Apple Git-122.3)

View File

@ -60,7 +60,7 @@ Name: udisks2
Summary: Disk Manager
Version: 2.9.0
%if %{is_git} == 0
Release: 1
Release: 2
%else
Release: 0.%{build_date}git%{git_hash}%{?dist}
%endif
@ -69,6 +69,8 @@ Group: System Environment/Libraries
URL: https://github.com/storaged-project/udisks
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
Patch1: 0001-udiskslinuxmountoptions-Prevent-a-memory-leak.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
BuildRequires: libgudev1-devel >= %{systemd_version}
@ -439,6 +441,9 @@ udevadm trigger
%endif
%changelog
* Mon Jul 27 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 2.9.0-2
- update from 2.8.1 to 2.9.0
* Tue Jul 14 2020 Zhiqiang Liu <liuzhiqiang26@huwei.com> - 2.9.0-1
- update from 2.8.1 to 2.9.0