qemu/util
Daniel P. Berrange 10a7b7e6fd sockets: avoid leak of listen file descriptor
If we iterate over the full port range without successfully binding+listening
on the socket, we'll try the next address, whereupon we overwrite the slisten
file descriptor variable without closing it.

Rather than having two places where we open + close socket FDs on different
iterations of nested for loops, re-arrange the code to always open+close
within the same loop iteration.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-11-07 14:10:20 +00:00
..
Makefile.objs
acl.c
aio-posix.c
aio-win32.c
aiocb.c
async.c
base64.c
bitmap.c
bitops.c
buffer.c
bufferiszero.c
cacheinfo.c
compatfd.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c
envlist.c
error.c
event_notifier-posix.c
event_notifier-win32.c
fifo8.c
getauxval.c
hbitmap.c
hexdump.c
host-utils.c
id.c
iohandler.c
iov.c
keyval.c
lockcnt.c
log.c
main-loop.c
memfd.c
mmap-alloc.c
module.c
notify.c
osdep.c
oslib-posix.c
oslib-win32.c
pagesize.c
path.c
qdist.c
qemu-config.c
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-error.c
qemu-openpty.c
qemu-option.c
qemu-progress.c
qemu-sockets.c sockets: avoid leak of listen file descriptor 2017-11-07 14:10:20 +00:00
qemu-thread-posix.c
qemu-thread-win32.c
qemu-timer-common.c
qemu-timer.c
qht.c
range.c
rcu.c
readline.c
stats64.c
systemd.c
thread-pool.c
throttle.c
timed-average.c
trace-events
unicode.c
uri.c
uuid.c