[gnome-boxes/obsessive-compulsive-disorder: 8/11] machine: Only clear the keyring for existing machines
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/obsessive-compulsive-disorder: 8/11] machine: Only clear the keyring for existing machines
- Date: Mon, 30 Mar 2020 09:23:58 +0000 (UTC)
commit 95e939c8a8c73bffef2844404ba716a7d26a7a11
Author: Felipe Borges <felipeborges gnome org>
Date: Thu Mar 26 12:21:21 2020 +0100
machine: Only clear the keyring for existing machines
If a Machine creation is interrupted, we don't have an entry in
the keyring, so there's nothing to be done.
This prevents Secret.password_clear from getting an NULL argument.
src/machine.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/machine.vala b/src/machine.vala
index 50c2644b..d86a06b7 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -752,6 +752,10 @@ private void handle_auth () {
}
private async void delete_auth_credentials () {
+ if (config.uuid == null) {
+ return;
+ }
+
try {
yield Secret.password_clear (secret_auth_schema, null,
"gnome-boxes-machine-uuid", config.uuid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]