7bf807
From 486778c778a4ddb24395408c6b267e702e19ae02 Mon Sep 17 00:00:00 2001
7bf807
From: Tomas Bzatek <tbzatek@redhat.com>
7bf807
Date: Sat, 1 Jan 2022 22:01:49 +0100
7bf807
Subject: [PATCH] udiskslinuxencrypted: Fix GError ownership
7bf807
7bf807
---
7bf807
 src/udiskslinuxencrypted.c | 3 +--
7bf807
 1 file changed, 1 insertion(+), 2 deletions(-)
7bf807
7bf807
diff --git a/src/udiskslinuxencrypted.c b/src/udiskslinuxencrypted.c
7bf807
index c3a0821ac..3bc54e695 100644
7bf807
--- a/src/udiskslinuxencrypted.c
7bf807
+++ b/src/udiskslinuxencrypted.c
7bf807
@@ -1040,7 +1040,7 @@ handle_resize (UDisksEncrypted       *encrypted,
7bf807
   object = udisks_daemon_util_dup_object (encrypted, &error);
7bf807
   if (object == NULL)
7bf807
     {
7bf807
-      g_dbus_method_invocation_take_error (invocation, error);
7bf807
+      g_dbus_method_invocation_return_gerror (invocation, error);
7bf807
       goto out;
7bf807
     }
7bf807
 
7bf807
@@ -1066,7 +1066,6 @@ handle_resize (UDisksEncrypted       *encrypted,
7bf807
   if (!udisks_daemon_util_get_caller_uid_sync (daemon, invocation, NULL /* GCancellable */, &caller_uid, &error))
7bf807
     {
7bf807
       g_dbus_method_invocation_return_gerror (invocation, error);
7bf807
-      g_clear_error (&error);
7bf807
       goto out;
7bf807
     }
7bf807