summaryrefslogtreecommitdiff
path: root/clients/common
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-09 08:26:56 +0100
committerThomas Haller <thaller@redhat.com>2019-02-14 08:00:29 +0100
commita4f0bda6d4d8856c8f1b1c8a910222ce87dfe9a9 (patch)
tree4d28b1536743925f95bace0525fa11727a1d6022 /clients/common
parent6ef825d501adc771a525808e1e1b3b9515d1cc0b (diff)
downloadNetworkManager-a4f0bda6d4d8856c8f1b1c8a910222ce87dfe9a9.tar.gz
clients/secret-agent: fail request_secrets_from_ui() if there are no secrets to be requested
From looking at the code above, this likely shouldn't actually happen.
Diffstat (limited to 'clients/common')
-rw-r--r--clients/common/nm-secret-agent-simple.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c
index f60d6cedf6..122af0aba6 100644
--- a/clients/common/nm-secret-agent-simple.c
+++ b/clients/common/nm-secret-agent-simple.c
@@ -874,6 +874,9 @@ request_secrets_from_ui (RequestData *request)
} else
goto out_fail;
+ if (secrets->len == 0)
+ goto out_fail;
+
g_signal_emit (request->self, signals[REQUEST_SECRETS], 0,
request->request_id, title, msg, secrets);
return;