From a4f0bda6d4d8856c8f1b1c8a910222ce87dfe9a9 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 9 Feb 2019 08:26:56 +0100 Subject: [PATCH] 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. --- clients/common/nm-secret-agent-simple.c | 3 +++ 1 file changed, 3 insertions(+) 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;