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>
This commit is contained in:
parent
c1204afc7c
commit
d1ec72a44e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user