Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
uv: upgrade to b450d87
  • Loading branch information
bnoordhuis committed Sep 12, 2011
1 parent 7dc2c49 commit 7e7e983
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion deps/uv/src/unix/eio/eio.c
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/src/unix/fs.c
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/win/getaddrinfo.c
Expand Up @@ -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;
Expand Down

0 comments on commit 7e7e983

Please sign in to comment.