1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-12 15:47:35 +00:00

sip: Avoid dereferencing a NULL pointer

secret_password_*_finish() may return FALSE without setting the GError.
F.e. trying to remove a non existent secret is not a failure.

The bug supposedly manifests itself because the updating account credentials
from the UI does not always seem to work correctly.
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-08-25 21:53:24 +02:00
parent 77ec258acc
commit c9dd476fa8

View file

@ -210,7 +210,8 @@ on_origin_pw_cleared (GObject *source,
g_autoptr (GError) error = NULL; g_autoptr (GError) error = NULL;
if (!secret_password_clear_finish (result, &error)) if (!secret_password_clear_finish (result, &error))
g_warning ("Could not delete the password in the keyring: %s", error->message); g_warning ("Could not delete the password in the keyring: %s",
error ? error->message : "No reason given");
} }
@ -243,7 +244,8 @@ on_origin_pw_saved (GObject *source,
g_autoptr (GError) error = NULL; g_autoptr (GError) error = NULL;
if (!secret_password_store_finish (result, &error)) { if (!secret_password_store_finish (result, &error)) {
g_warning ("Could not store the password in the keyring: %s", error->message); g_warning ("Could not store the password in the keyring: %s",
error ? error->message : "No reason given");
} }
} }