1
0
mirror of https://github.com/simh/simh.git synced 2026-02-27 09:09:46 +00:00

SLIRP: Fix coverity identified complaint

This commit is contained in:
Mark Pizzolato
2019-05-01 21:48:47 -07:00
parent 52fab988e3
commit d861fa224a

View File

@@ -632,7 +632,8 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr,
(listen(s,1) == SOCKET_ERROR)) {
int tmperrno = errno; /* Don't clobber the real reason we failed */
closesocket(s);
if (s != -1)
closesocket(s);
sofree(so);
fprintf (stderr, "Socket Error %d", tmperrno);
/* Restore the real errno */