mirror of https://gitee.com/openkylin/qemu.git
qtest: Assure that init_socket()'s listen() does not fail
In practice this seems very unlikely, so cleanup is neglected, as done for bind(). Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
4688c94c1f
commit
a7ded163db
|
@ -72,7 +72,8 @@ static int init_socket(const char *socket_path)
|
|||
ret = bind(sock, (struct sockaddr *)&addr, sizeof(addr));
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
g_assert_no_errno(ret);
|
||||
listen(sock, 1);
|
||||
ret = listen(sock, 1);
|
||||
g_assert_no_errno(ret);
|
||||
|
||||
return sock;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue