diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-06-30 11:03:28 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-02 06:25:28 +0200 |
commit | 9261ef5e32b0559642ccb70565836e1bc023937e (patch) | |
tree | c05577c4c52758094879bad94e4b2af7b0a4302a /chardev/char-socket.c | |
parent | 5a79d10c953c9eebc69e4ad7c18cd8476782cf6f (diff) |
Clean up some calls to ignore Error objects the right way
Receiving the error in a local variable only to free it is less clear
(and also less efficient) than passing NULL. Clean up.
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Jerome Forissier <jerome@forissier.org>
CC: Greg Kurz <groug@kaod.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20200630090351.1247703-4-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'chardev/char-socket.c')
-rw-r--r-- | chardev/char-socket.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 569d54c144..5758d9900f 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -817,22 +817,20 @@ static void tcp_chr_tls_init(Chardev *chr) { SocketChardev *s = SOCKET_CHARDEV(chr); QIOChannelTLS *tioc; - Error *err = NULL; gchar *name; if (s->is_listen) { tioc = qio_channel_tls_new_server( s->ioc, s->tls_creds, s->tls_authz, - &err); + NULL); } else { tioc = qio_channel_tls_new_client( s->ioc, s->tls_creds, s->addr->u.inet.host, - &err); + NULL); } if (tioc == NULL) { - error_free(err); tcp_chr_disconnect(chr); return; } |