diff --git a/0002-Fix-leaking-error.patch b/0002-Fix-leaking-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..412b0bd5c86902e19f7fdcf6d38c9db87c3c736d --- /dev/null +++ b/0002-Fix-leaking-error.patch @@ -0,0 +1,33 @@ +From 990b4136608ad1ae69e9727ccb16b9ecf88644e5 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Mon, 20 Nov 2023 17:49:46 +0100 +Subject: [PATCH] lvm-dbus: Fix leaking error + +--- + src/plugins/lvm-dbus.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/lvm-dbus.c b/src/plugins/lvm-dbus.c +index e822bd6..e1a9079 100644 +--- a/src/plugins/lvm-dbus.c ++++ b/src/plugins/lvm-dbus.c +@@ -362,10 +362,14 @@ void bd_lvm_close (void) { + + /* the check() call should create the DBus connection for us, but let's not + completely rely on it */ +- if (!g_dbus_connection_flush_sync (bus, NULL, &error)) ++ if (!g_dbus_connection_flush_sync (bus, NULL, &error)) { + bd_utils_log_format (BD_UTILS_LOG_CRIT, "Failed to flush DBus connection: %s", error->message); +- if (!g_dbus_connection_close_sync (bus, NULL, &error)) ++ g_clear_error (&error); ++ } ++ if (!g_dbus_connection_close_sync (bus, NULL, &error)) { + bd_utils_log_format (BD_UTILS_LOG_CRIT, "Failed to close DBus connection: %s", error->message); ++ g_clear_error (&error); ++ } + + dm_log_with_errno_init (NULL); + dm_log_init_verbose (0); +-- +2.27.0 + diff --git a/libblockdev.spec b/libblockdev.spec index 0aa6de321b30001b6bdfeffe021e194b5f8879da..e1786f2d5c15d23dee3bfbfbf451b0f579250754 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -3,13 +3,14 @@ Name: libblockdev Version: 3.0.4 -Release: 4 +Release: 5 Summary: libblockdev is a C library supporting GObject introspection for manipulation of block devices License: LGPLv2+ URL: https://github.com/storaged-project/libblockdev Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz Patch1: 0001-Add-BDPluginSpec-constructor-and-use-it-in-plugin_sp.patch +Patch2: 0002-Fix-leaking-error.patch BuildRequires: make glib2-devel libyaml-devel libbytesize-devel parted-devel libuuid-devel ndctl-devel device-mapper-devel BuildRequires: device-mapper-devel systemd-devel nss-devel volume_key-devel >= 0.3.9-7 libblkid-devel libmount-devel @@ -159,6 +160,12 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %changelog +* Sat May 11 2024 yanshuai - 3.0.4-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:lvm-dbus: Fix leaking error + * Wed Apr 3 2024 wangzhiqiang - 3.0.4-4 - Type:bugfix - ID:NA