diff options
author | Matthias Clasen <mclasen@redhat.com> | 2009-09-24 01:11:16 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2009-09-24 01:11:16 -0400 |
commit | d9f4838baff87ad39f1726200e1b0812b7813808 (patch) | |
tree | ef48091077ed6b204f31f6fd82431da29c908430 | |
parent | 76fba3d10411fc62a89d636ec2592cdf8015fbb2 (diff) |
fix a small memory leak
-rw-r--r-- | src/ck-manager.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ck-manager.c b/src/ck-manager.c index 4b7200b..99693a3 100644 --- a/src/ck-manager.c +++ b/src/ck-manager.c @@ -810,12 +810,9 @@ check_polkit_permissions (CkManager *manager, AuthorizedCallback callback) { const char *sender; - GError *error; PolkitSubject *subject; AuthorizedCallbackData *data; - error = NULL; - g_debug ("constructing polkit data"); /* Check that caller is privileged */ @@ -837,6 +834,7 @@ check_polkit_permissions (CkManager *manager, NULL, (GAsyncReadyCallback)auth_ready_callback, data); + g_object_unref (subject); } static void @@ -873,14 +871,12 @@ get_polkit_permissions (CkManager *manager, { const char *sender; PolkitSubject *subject; - GError *error; g_debug ("get permissions for action %s", action); sender = dbus_g_method_get_sender (context); subject = polkit_system_bus_name_new (sender); - error = NULL; polkit_authority_check_authorization (manager->priv->pol_ctx, subject, action, @@ -890,7 +886,6 @@ get_polkit_permissions (CkManager *manager, (GAsyncReadyCallback) ready_cb, context); g_object_unref (subject); - } #endif |