From 55ad538cfb51d44557e2ceb1cabbd8ab88910074 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 13 Apr 2017 14:09:44 +0200 Subject: [PATCH] libnm-glib/secret-agent: don't error out on missing out_connection It's perfectly valid to call the function with out_connection == NULL when connection_hash == NULL too, as cancel_get_secrets() does. Fixes: fbb1662269e3c47fa51abfe37d1f3c8f0a213bd0 (cherry picked from commit c4a0002f05fd0f57091b95646f1c9064e208ea66) --- libnm-glib/nm-secret-agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c index aeb7a208ca..75129e06f8 100644 --- a/libnm-glib/nm-secret-agent.c +++ b/libnm-glib/nm-secret-agent.c @@ -304,7 +304,7 @@ verify_request (NMSecretAgent *self, { NMConnection *connection = NULL; - g_return_val_if_fail (out_connection, FALSE); + g_return_val_if_fail (!connection_hash || out_connection, FALSE); if (!verify_sender (self, context, error)) return FALSE;