OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4688c94
)
qtest: Assure that init_socket()'s listen() does not fail
author
Andreas Färber
<afaerber@suse.de>
Thu, 17 Apr 2014 16:19:14 +0000
(18:19 +0200)
committer
Andreas Färber
<afaerber@suse.de>
Mon, 5 May 2014 18:58:33 +0000
(20:58 +0200)
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>
tests/libqtest.c
patch
|
blob
|
history
diff --git
a/tests/libqtest.c
b/tests/libqtest.c
index
8155695
..
232f781
100644
(file)
--- a/
tests/libqtest.c
+++ b/
tests/libqtest.c
@@
-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;
}