summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/unix/pipe.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-15 14:43:50 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-15 14:43:50 (GMT)
commited17516b31404dd42eab61c599c84933af485b34 (patch)
tree52538b48c172c7258117b1edcee4359dcf6c45e5 /Utilities/cmlibuv/src/unix/pipe.c
parent52fbae0a59d05f2724e77aff75c7761b685bae03 (diff)
parent12a78bc824655524d817508d6107ef4dcf8e3626 (diff)
downloadCMake-ed17516b31404dd42eab61c599c84933af485b34.zip
CMake-ed17516b31404dd42eab61c599c84933af485b34.tar.gz
CMake-ed17516b31404dd42eab61c599c84933af485b34.tar.bz2
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv: libuv 2017-05-09 (e11dcd43) Fixes: #16878
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;