On Fri, Oct 20, 2017 at 10:28:44AM +0100, Daniel P. Berrange wrote:
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.
Signed-off-by: Daniel P. Berrange <address@hidden>
---
util/qemu-sockets.c | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
Self-NACK this has a bug too