summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2020-05-14 18:41:36 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2020-05-14 18:41:36 +0200
commita1fa80a4f8e747b31b999035729b7871ae072817 (patch)
tree549452b8dc22f909fee01b730f1e995212013324 /sysdep/unix
parent7c48486265d8219922743de42ddcc303f553ba4a (diff)
WIP fix
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/io.c5
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;
}