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