commit | 3ea1a72ad61865fac3134686d5f4c6b4a17b2a91 | [log] [tgz] |
---|---|---|
author | Peter Maydell <peter.maydell@linaro.org> | Sun Jul 09 18:54:22 2017 +0100 |
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | Sat Jul 15 14:28:25 2017 +0200 |
tree | 7181be361516b1ea31a4d5fa13a50b41fb87e097 | |
parent | c0870d703b1c5a7bb6c573c585957751b3971f4e [diff] |
slirp: fork_exec(): Don't close() a negative number in fork_exec() In a fork_exec() error path we try to closesocket(s) when s might be a negative number because the thing that failed was the qemu_socket() call. Add a guard so we don't do this. (Spotted by Coverity: CID 1005727 issue 1 of 2.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>