mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gapplication: fix memory leak
g_variant_get_child_value() returns a new GVariant, which we must free. https://bugzilla.gnome.org/show_bug.cgi?id=710885
This commit is contained in:
parent
0e1924a66c
commit
3e48e3be40
@ -889,13 +889,19 @@ g_dbus_command_line_new (GDBusMethodInvocation *invocation)
|
||||
{
|
||||
GDBusCommandLine *gdbcl;
|
||||
GVariant *args;
|
||||
GVariant *arguments, *platform_data;
|
||||
|
||||
args = g_dbus_method_invocation_get_parameters (invocation);
|
||||
|
||||
arguments = g_variant_get_child_value (args, 1);
|
||||
platform_data = g_variant_get_child_value (args, 2);
|
||||
gdbcl = g_object_new (g_dbus_command_line_get_type (),
|
||||
"arguments", g_variant_get_child_value (args, 1),
|
||||
"platform-data", g_variant_get_child_value (args, 2),
|
||||
"arguments", arguments,
|
||||
"platform-data", platform_data,
|
||||
NULL);
|
||||
g_variant_unref (arguments);
|
||||
g_variant_unref (platform_data);
|
||||
|
||||
gdbcl->connection = g_dbus_method_invocation_get_connection (invocation);
|
||||
gdbcl->bus_name = g_dbus_method_invocation_get_sender (invocation);
|
||||
g_variant_get_child (args, 0, "&o", &gdbcl->object_path);
|
||||
|
Loading…
Reference in New Issue
Block a user