qemu-e2k/gdbstub
Ilya Leoshkevich 6971998e24 gdbstub: Fix double close() of the follow-fork-mode socket
When the terminal GDB_FORK_ENABLED state is reached, the coordination
socket is not needed anymore and is therefore closed. However, if there
is a communication error between QEMU gdbstub and GDB, the generic
error handling code attempts to close it again.

Fix by closing it later - before returning - instead.

Fixes: Coverity CID 1539966
Fixes: d547e711a8 ("gdbstub: Implement follow-fork-mode child")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240312001813.13720-1-iii@linux.ibm.com>
2024-03-13 11:43:52 +00:00
..
gdbstub.c gdbstub: Add Xfer:siginfo:read stub 2024-03-13 11:43:52 +00:00
internals.h gdbstub: Add Xfer:siginfo:read stub 2024-03-13 11:43:52 +00:00
meson.build
syscalls.c
system.c
trace-events
trace.h
user-target.c
user.c gdbstub: Fix double close() of the follow-fork-mode socket 2024-03-13 11:43:52 +00:00