diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-06-24 08:39:46 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-06-28 22:10:33 +0400 |
commit | d1ec72a44e0a167f9e8254d6d1098d27f104571f (patch) | |
tree | 8183571cb355533cf083c30ec77b242948e5b23a | |
parent | c1204afc7c048cf58b0a8f1c11886f36ca73ef28 (diff) |
qemu-socket: catch monitor_get_fd failures
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | util/qemu-sockets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 35023a8a92..126cbb603b 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -903,7 +903,7 @@ int socket_connect(SocketAddress *addr, Error **errp, case SOCKET_ADDRESS_KIND_FD: fd = monitor_get_fd(cur_mon, addr->fd->str, errp); - if (callback) { + if (fd >= 0 && callback) { qemu_set_nonblock(fd); callback(fd, opaque); } |