From 6b9f07cbf791ce783525a9cc6eb39786177a79e1 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 16 Apr 2018 13:52:09 -0500 Subject: [PATCH] trivial: fix a null pointer dereference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../src/fu-main.c: In function ‘fu_main_daemon_method_call’: ../src/fu-main.c:667:47: error: null pointer dereference [-Werror=null-dereference] polkit_authority_check_authorization (helper->priv->authority, subject, ~~~~~~^~~~~~ ../src/fu-main.c:698:47: error: null pointer dereference [-Werror=null-dereference] polkit_authority_check_authorization (helper->priv->authority, subject, ~~~~~~^~~~~~ --- src/fu-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fu-main.c b/src/fu-main.c index 59b86736c..d18353a34 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -670,7 +670,7 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender, /* authenticate */ fu_main_set_status (priv, FWUPD_STATUS_WAITING_FOR_AUTH); subject = polkit_system_bus_name_new (sender); - polkit_authority_check_authorization (helper->priv->authority, subject, + polkit_authority_check_authorization (priv->authority, subject, "org.freedesktop.fwupd.modify-remote", NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, @@ -701,7 +701,7 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender, /* authenticate */ fu_main_set_status (priv, FWUPD_STATUS_WAITING_FOR_AUTH); subject = polkit_system_bus_name_new (sender); - polkit_authority_check_authorization (helper->priv->authority, subject, + polkit_authority_check_authorization (priv->authority, subject, "org.freedesktop.fwupd.verify-update", NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,