summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-01-22 23:34:56 +0100
committerThomas Haller <thaller@redhat.com>2019-02-05 08:34:23 +0100
commit1a0fc8d437b04641b41c86cd1e9a35c48b5b2c67 (patch)
tree1a2e1083e8cef062cc5eeb3b54eb7068b94ab73c
parent883978ec99d18b35d85dc6964da1bf74692c55a5 (diff)
downloadNetworkManager-1a0fc8d437b04641b41c86cd1e9a35c48b5b2c67.tar.gz
clients/secret-agent: fix leaks in request_secrets_from_ui()
Fixes: 3bda3fb60c104114192e4e3c9c4ba0bef84d3a00
-rw-r--r--clients/common/nm-secret-agent-simple.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c
index eab11841a6..cd2b71cfd3 100644
--- a/clients/common/nm-secret-agent-simple.c
+++ b/clients/common/nm-secret-agent-simple.c
@@ -728,11 +728,11 @@ try_spawn_vpn_auth_helper (RequestData *request,
static void
request_secrets_from_ui (RequestData *request)
{
- GPtrArray *secrets;
+ gs_unref_ptrarray GPtrArray *secrets = NULL;
NMSecretAgentSimplePrivate *priv;
NMSecretAgentSimpleSecret *secret;
const char *title;
- char *msg;
+ gs_free char *msg = NULL;
gboolean ok = TRUE;
priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE (request->self);
@@ -881,7 +881,6 @@ request_secrets_from_ui (RequestData *request)
request->request_id,
nm_connection_get_connection_type (request->connection));
_request_data_complete (request, NULL, error, NULL);
- g_ptr_array_unref (secrets);
return;
}