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: 6793a32a8c

(cherry picked from commit 9ffcecf86a)
(cherry picked from commit 2071e4794f)
This commit is contained in:
Thomas Haller 2015-06-03 17:59:53 +02:00
parent e9e032bd51
commit 6099378bc6

View file

@ -301,6 +301,7 @@ 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));
}