gdbstub: Handle errors in gdb_accept()
commit2f652224f76c115f6c991766b7acac1e22580954
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 14 May 2018 17:30:44 +0000 (14 18:30 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 20 May 2018 05:56:21 +0000 (20 08:56 +0300)
treea63a472ad391c66234a4c09239447a8e7a99fd97
parentf5bdd781316d2ba140323cb98392e44cac54017d
gdbstub: Handle errors in gdb_accept()

In gdb_accept(), we both fail to check all errors (notably
that from socket_set_nodelay(), as Coverity notes in CID 1005666),
and fail to return an error status back to our caller. Correct
both of these things, so that errors in accept() result in our
stopping with a useful error message rather than ignoring it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
gdbstub.c