aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-09-26 10:13:39 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-09-26 10:13:39 +0100
commitd4e536f336d3d26c9fafa2a2549aaa0b014f5b6b (patch)
treea7d05bb39c674ef01d8d2d60a94caca44136df92 /util
parent4142b011cac481356c6d0cf7a9046621a67484af (diff)
parentda5e1169183ca6eb6fb470dc32ed1bfc24d1d406 (diff)
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-09-24-v2' into staging
nbd patches for 2019-09-24 - Improved error message for plaintext client of encrypted server - Fix various assertions when -object iothread is in use - Silence a Coverity error for use-after-free on error path # gpg: Signature made Wed 25 Sep 2019 14:35:52 BST # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2019-09-24-v2: util/qemu-sockets: fix keep_alive handling in inet_connect_saddr tests: Use iothreads during iotest 223 nbd: Grab aio context lock in more places nbd/server: attach client channel to the export's AioContext nbd/client: Add hint when TLS is missing Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/qemu-sockets.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 98ff3a1cce..bcc06d0e01 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -461,12 +461,13 @@ int inet_connect_saddr(InetSocketAddress *saddr, Error **errp)
}
}
+ freeaddrinfo(res);
+
if (sock < 0) {
error_propagate(errp, local_err);
+ return sock;
}
- freeaddrinfo(res);
-
if (saddr->keep_alive) {
int val = 1;
int ret = qemu_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,