summaryrefslogtreecommitdiff
path: root/src/ck-session.c
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2015-07-12 18:58:03 +0300
committerEric Koegel <eric.koegel@gmail.com>2015-07-19 09:04:14 +0300
commit6e18c573cdad612aec048ec4f40eea20fd3f48bd (patch)
tree18516f6187811616fb6483a8d18b176f5a87cda2 /src/ck-session.c
parentb6481e911596893f5299671f0319340544487402 (diff)
downloadConsoleKit2-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.c6
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;