win: return UV_ENOMEM from uv_loop_init()
This commit sets the error returned by uv_loop_init() to UV_ENOMEM in the case of a failed timer heap malloc. PR-URL: https://github.com/libuv/libuv/pull/1944 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
parent
76b873e837
commit
7284adfa7a
@ -249,8 +249,10 @@ int uv_loop_init(uv_loop_t* loop) {
|
||||
loop->endgame_handles = NULL;
|
||||
|
||||
loop->timer_heap = timer_heap = uv__malloc(sizeof(*timer_heap));
|
||||
if (timer_heap == NULL)
|
||||
if (timer_heap == NULL) {
|
||||
err = UV_ENOMEM;
|
||||
goto fail_timers_alloc;
|
||||
}
|
||||
|
||||
heap_init(timer_heap);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user