Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'as/calloc-takes-nmemb-then-size'
[gitweb.git]
/
unix-socket.c
diff --git
a/unix-socket.c
b/unix-socket.c
index 943a94734a25a2b3e0c7e33b89e16b41a11ab520..19ed48be9902f321285bfbec3feaf8357fd5e9b9 100644
(file)
--- a/
unix-socket.c
+++ b/
unix-socket.c
@@
-99,11
+99,12
@@
int unix_stream_listen(const char *path)
struct sockaddr_un sa;
struct unix_sockaddr_context ctx;
+ unlink(path);
+
if (unix_sockaddr_init(&sa, path, &ctx) < 0)
return -1;
fd = unix_stream_socket();
- unlink(path);
if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) < 0)
goto fail;