trivial: fix a null pointer dereference

../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,
                                         ~~~~~~^~~~~~
This commit is contained in:
Mario Limonciello 2018-04-16 13:52:09 -05:00 committed by Richard Hughes
parent a6f44e11ff
commit 6b9f07cbf7

View File

@ -670,7 +670,7 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender,
/* authenticate */ /* authenticate */
fu_main_set_status (priv, FWUPD_STATUS_WAITING_FOR_AUTH); fu_main_set_status (priv, FWUPD_STATUS_WAITING_FOR_AUTH);
subject = polkit_system_bus_name_new (sender); 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", "org.freedesktop.fwupd.modify-remote",
NULL, NULL,
POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
@ -701,7 +701,7 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender,
/* authenticate */ /* authenticate */
fu_main_set_status (priv, FWUPD_STATUS_WAITING_FOR_AUTH); fu_main_set_status (priv, FWUPD_STATUS_WAITING_FOR_AUTH);
subject = polkit_system_bus_name_new (sender); 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", "org.freedesktop.fwupd.verify-update",
NULL, NULL,
POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,