diff options
-rw-r--r-- | sysdep/unix/io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index bdad4ab9..0cec705d 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1583,6 +1583,11 @@ sk_connect_unix(sock *s, char *name, socklen_t namelen) sk_insert(s); sk_alloc_bufs(s); return 0; + + err: + close(fd); + s->fd = -1; + return -1; } |