From e6810f64f49d789099b96d69ae25705c6bdbe7c9 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 26 Mar 2024 14:04:27 +0100
Subject: [PATCH] lvm-dbus: Fix leaking error in bd_lvm_init

---
 src/plugins/lvm-dbus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/lvm-dbus.c b/src/plugins/lvm-dbus.c
index e822bd6..a9c1d11 100644
--- a/src/plugins/lvm-dbus.c
+++ b/src/plugins/lvm-dbus.c
@@ -337,6 +337,7 @@ gboolean bd_lvm_init (void) {
        completely rely on it */
     if (G_UNLIKELY (!bus) && !setup_dbus_connection (&error)) {
         bd_utils_log_format (BD_UTILS_LOG_CRIT, "Failed to setup DBus connection: %s", error->message);
+        g_clear_error (&error);
         return FALSE;
     }
 
-- 
2.43.0

