summaryrefslogtreecommitdiff
path: root/deps/uv
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-09-12 18:41:48 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2011-09-12 18:41:48 +0200
commit7e7e983781e3a422093f373e337a1c23cf3202c7 (patch)
treece1f24ba2ed9ee861bf2788cad7d71e632f224bd /deps/uv
parent7dc2c492e9816631aae0eb72c218e0389c5d6e5f (diff)
downloadnodejs-7e7e983781e3a422093f373e337a1c23cf3202c7.tar.gz
nodejs-7e7e983781e3a422093f373e337a1c23cf3202c7.tar.bz2
nodejs-7e7e983781e3a422093f373e337a1c23cf3202c7.zip
uv: upgrade to b450d87
Diffstat (limited to 'deps/uv')
-rw-r--r--deps/uv/src/unix/eio/eio.c12
-rw-r--r--deps/uv/src/unix/fs.c2
-rw-r--r--deps/uv/src/win/getaddrinfo.c2
3 files changed, 14 insertions, 2 deletions
diff --git a/deps/uv/src/unix/eio/eio.c b/deps/uv/src/unix/eio/eio.c
index a005db5d3..74153ad16 100644
--- a/deps/uv/src/unix/eio/eio.c
+++ b/deps/uv/src/unix/eio/eio.c
@@ -1812,7 +1812,17 @@ eio__scandir (eio_req *req, etp_worker *self)
#endif
if (req->flags & EIO_FLAG_PTR1_FREE)
- free (req->ptr1);
+ {
+ req->flags &= ~EIO_FLAG_PTR1_FREE;
+ free (req->ptr1);
+ req->ptr1 = NULL;
+ }
+
+ if (!dirp)
+ {
+ req->errorno = errno;
+ return;
+ }
req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE;
req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0;
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c
index cab41064b..60f5e59d7 100644
--- a/deps/uv/src/unix/fs.c
+++ b/deps/uv/src/unix/fs.c
@@ -123,6 +123,8 @@ static int uv__fs_after(eio_req* eio) {
* callback. We must keep it until uv_fs_req_cleanup. If we get rid of
* libeio this can be avoided.
*/
+ if (req->eio->ptr2 == NULL)
+ break;
buflen = 0;
name = req->eio->ptr2;
for (i = 0; i < req->result; i++) {
diff --git a/deps/uv/src/win/getaddrinfo.c b/deps/uv/src/win/getaddrinfo.c
index 1d4e819d7..3d313420a 100644
--- a/deps/uv/src/win/getaddrinfo.c
+++ b/deps/uv/src/win/getaddrinfo.c
@@ -255,7 +255,7 @@ int uv_getaddrinfo(uv_loop_t* loop,
goto error;
}
- uv_req_init(loop, (uv_req_t*) handle);
+ uv_req_init(loop, (uv_req_t*)handle);
handle->getaddrinfo_cb = getaddrinfo_cb;
handle->res = NULL;