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:
@@ -210,7 +210,8 @@ on_origin_pw_cleared (GObject *source,
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
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;
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user