Searched hist:"10 a7b7e6" (Results 1 – 1 of 1) sorted by relevance
/openbmc/qemu/util/ |
H A D | qemu-sockets.c | 10a7b7e6 Fri Oct 20 04:18:39 CDT 2017 Daniel P. Berrange <berrange@redhat.com> 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>
|