libnm: fix take ownership of floating argument in NMSecretAgentOld:get_secrets_cb()

The previous patch 9ffcecf86a was
completely wrong.

It tried to fix callers that provided a floating GVariant reference.
We require the caller to unref @secrets, so the correct fix it to
ensure that the reference is not floating.

Fixes: 9ffcecf86a
Fixes: 6793a32a8c
This commit is contained in:
Thomas Haller 2015-06-03 17:59:53 +02:00
parent 9ffcecf86a
commit 2071e4794f

View file

@ -301,8 +301,9 @@ get_secrets_cb (NMSecretAgentOld *self,
if (error)
g_dbus_method_invocation_return_gerror (info->context, error);
else {
g_variant_take_ref (secrets);
g_dbus_method_invocation_return_value (info->context,
g_variant_new ("(a{sa{sv}})", secrets));
g_variant_new ("(@a{sa{sv}})", secrets));
}
/* Remove the request from internal tracking */