SLIRP: Fix coverity identified complaint
This commit is contained in:
parent
52fab988e3
commit
d861fa224a
1 changed files with 2 additions and 1 deletions
|
@ -632,6 +632,7 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr,
|
||||||
(listen(s,1) == SOCKET_ERROR)) {
|
(listen(s,1) == SOCKET_ERROR)) {
|
||||||
int tmperrno = errno; /* Don't clobber the real reason we failed */
|
int tmperrno = errno; /* Don't clobber the real reason we failed */
|
||||||
|
|
||||||
|
if (s != -1)
|
||||||
closesocket(s);
|
closesocket(s);
|
||||||
sofree(so);
|
sofree(so);
|
||||||
fprintf (stderr, "Socket Error %d", tmperrno);
|
fprintf (stderr, "Socket Error %d", tmperrno);
|
||||||
|
|
Loading…
Add table
Reference in a new issue