gapplication: Fix a small leak on an error handling path

This was highlighted (but not introduced) by
0144feb41f. 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
This commit is contained in:
Philip Withnall 2024-05-07 17:04:28 +01:00
parent d22c4574cd
commit b9e655b4d4
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -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, g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
"Unknown action %s", name); "Unknown action %s", name);
g_clear_pointer (&parameter, g_variant_unref); g_variant_iter_free (iter);
g_variant_unref (platform_data); g_variant_unref (platform_data);
return; return;
} }