qemu/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 meson: remove config_targetos 2023-12-31 09:11:28 +01:00
syscalls.c gdbstub: Build syscall.c once 2023-03-07 20:44:09 +00:00
system.c gdbstub: use a better signal when we halt for IO reasons 2023-12-01 14:00:52 +00:00
trace-events gdbstub: Rename 'softmmu' -> 'system' 2023-10-07 19:02:59 +02:00
trace.h
user-target.c {linux,bsd}-user: Introduce get_task_state() 2024-03-06 12:35:19 +00:00
user.c gdbstub: Fix double close() of the follow-fork-mode socket 2024-03-13 11:43:52 +00:00