udisk2: backport upstream patches-epoch1 Signed-off-by: Zhiqiang Liu <lzhq28@mail.ustc.edu.cn>
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
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)
|
|
|