diff options
author | Fedor Indutny <fedor@indutny.com> | 2014-09-19 21:37:55 +0400 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-09-23 08:18:41 -0700 |
commit | c5f5d4cd11c2aec74fa03985405122d1ecb06f69 (patch) | |
tree | 17accc5b501eb89e6810cac8df50b54901b6cfee /deps/uv/src/fs-poll.c | |
parent | 6e08bb94e8b1aaf913cf88106cb59f9d2ae85925 (diff) | |
download | android-node-v8-c5f5d4cd11c2aec74fa03985405122d1ecb06f69.tar.gz android-node-v8-c5f5d4cd11c2aec74fa03985405122d1ecb06f69.tar.bz2 android-node-v8-c5f5d4cd11c2aec74fa03985405122d1ecb06f69.zip |
deps: update uv to v1.0.0-rc1
Diffstat (limited to 'deps/uv/src/fs-poll.c')
-rw-r--r-- | deps/uv/src/fs-poll.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/deps/uv/src/fs-poll.c b/deps/uv/src/fs-poll.c index 871228fc8d..0de15b1739 100644 --- a/deps/uv/src/fs-poll.c +++ b/deps/uv/src/fs-poll.c @@ -60,6 +60,7 @@ int uv_fs_poll_start(uv_fs_poll_t* handle, struct poll_ctx* ctx; uv_loop_t* loop; size_t len; + int err; if (uv__is_active(handle)) return 0; @@ -78,19 +79,25 @@ int uv_fs_poll_start(uv_fs_poll_t* handle, ctx->parent_handle = handle; memcpy(ctx->path, path, len + 1); - if (uv_timer_init(loop, &ctx->timer_handle)) - abort(); + err = uv_timer_init(loop, &ctx->timer_handle); + if (err < 0) + goto error; ctx->timer_handle.flags |= UV__HANDLE_INTERNAL; uv__handle_unref(&ctx->timer_handle); - if (uv_fs_stat(loop, &ctx->fs_req, ctx->path, poll_cb)) - abort(); + err = uv_fs_stat(loop, &ctx->fs_req, ctx->path, poll_cb); + if (err < 0) + goto error; handle->poll_ctx = ctx; uv__handle_start(handle); return 0; + +error: + free(ctx); + return err; } |