diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/up-polkit.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/up-polkit.c b/src/up-polkit.c index d7760dd..9b86394 100644 --- a/src/up-polkit.c +++ b/src/up-polkit.c @@ -69,11 +69,14 @@ up_polkit_check_auth (UpPolkit *polkit, PolkitSubject *subject, const gchar *act { gboolean ret = FALSE; GError *error; - GError *error_local; + GError *error_local = NULL; PolkitAuthorizationResult *result; /* check auth */ - result = polkit_authority_check_authorization_sync (polkit->priv->authority, subject, action_id, NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, NULL, &error_local); + result = polkit_authority_check_authorization_sync (polkit->priv->authority, + subject, action_id, NULL, + POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, + NULL, &error_local); if (result == NULL) { error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message); dbus_g_method_return_error (context, error); @@ -104,11 +107,14 @@ up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *act { gboolean ret = FALSE; GError *error; - GError *error_local; + GError *error_local = NULL; PolkitAuthorizationResult *result; /* check auth */ - result = polkit_authority_check_authorization_sync (polkit->priv->authority, subject, action_id, NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE, NULL, &error_local); + result = polkit_authority_check_authorization_sync (polkit->priv->authority, + subject, action_id, NULL, + POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE, + NULL, &error_local); if (result == NULL) { error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message); dbus_g_method_return_error (context, error); |