diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2015-07-12 18:58:03 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2015-07-19 09:04:14 +0300 |
commit | 6e18c573cdad612aec048ec4f40eea20fd3f48bd (patch) | |
tree | 18516f6187811616fb6483a8d18b176f5a87cda2 /src/ck-session.c | |
parent | b6481e911596893f5299671f0319340544487402 (diff) | |
download | ConsoleKit2-6e18c573cdad612aec048ec4f40eea20fd3f48bd.tar.gz |
Fix get_caller_info in CkSession
And make sure we unref the variants that get created.
Diffstat (limited to 'src/ck-session.c')
-rw-r--r-- | src/ck-session.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ck-session.c b/src/ck-session.c index fc15d63..ca0f8ca 100644 --- a/src/ck-session.c +++ b/src/ck-session.c @@ -275,7 +275,8 @@ get_caller_info (CkSession *session, g_error_free (error); goto out; } - g_variant_get (value, "(u)", &calling_uid); + g_variant_get (value, "(u)", calling_uid); + g_variant_unref (value); value = g_dbus_proxy_call_sync (session->priv->bus_proxy, "GetConnectionUnixProcessID", g_variant_new ("(s)", sender), @@ -289,7 +290,8 @@ get_caller_info (CkSession *session, g_error_free (error); goto out; } - g_variant_get (value, "(u)", &calling_pid); + g_variant_get (value, "(u)", calling_pid); + g_variant_unref (value); res = TRUE; |