From b9e655b4d478a7a9e41c77aefc6603684b73c8a9 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 7 May 2024 17:04:28 +0100 Subject: [PATCH] gapplication: Fix a small leak on an error handling path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was highlighted (but not introduced) by 0144feb41fc1819cec6415483bd8a61e64373aca. Previously the test coverage didn’t cover this branch, I think. `iter` was leaked, and at this point `parameter` had never been set, so clearing it was unnecessary. Signed-off-by: Philip Withnall Helps: #3349 --- gio/gapplicationimpl-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c index 1ba533839..b78ebe76a 100644 --- a/gio/gapplicationimpl-dbus.c +++ b/gio/gapplicationimpl-dbus.c @@ -299,7 +299,7 @@ g_application_impl_method_call (GDBusConnection *connection, { g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "Unknown action ‘%s’", name); - g_clear_pointer (¶meter, g_variant_unref); + g_variant_iter_free (iter); g_variant_unref (platform_data); return; }