summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/unix/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibuv/src/unix/pipe.c')
-rw-r--r--Utilities/cmlibuv/src/unix/pipe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Utilities/cmlibuv/src/unix/pipe.c b/Utilities/cmlibuv/src/unix/pipe.c
index 80f5e6f..023e965 100644
--- a/Utilities/cmlibuv/src/unix/pipe.c
+++ b/Utilities/cmlibuv/src/unix/pipe.c
@@ -73,7 +73,9 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
/* Convert ENOENT to EACCES for compatibility with Windows. */
if (err == -ENOENT)
err = -EACCES;
- goto err_bind;
+
+ uv__close(sockfd);
+ goto err_socket;
}
/* Success. */
@@ -82,9 +84,6 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
handle->io_watcher.fd = sockfd;
return 0;
-err_bind:
- uv__close(sockfd);
-
err_socket:
uv__free((void*)pipe_fname);
return err;