summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@gnome.org>2024-05-07 17:04:28 +0100
committerPhilip Withnall <pwithnall@gnome.org>2024-05-07 17:04:28 +0100
commitb9e655b4d478a7a9e41c77aefc6603684b73c8a9 (patch)
tree7534d04dda89380c0c798e639b76ba600c8c364b
parentd22c4574cd45b1395f4b76937c4b97c66f24742b (diff)
downloadglib-b9e655b4d478a7a9e41c77aefc6603684b73c8a9.tar.gz
gapplication: Fix a small leak on an error handling path
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 <pwithnall@gnome.org> Helps: #3349
-rw-r--r--gio/gapplicationimpl-dbus.c2
1 files changed, 1 insertions, 1 deletions
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 (&parameter, g_variant_unref);
+ g_variant_iter_free (iter);
g_variant_unref (platform_data);
return;
}