From a4c8ffa3c2f6f927bff10b9e684f4b9513a97826 Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Mon, 12 Dec 2011 12:15:29 -0800 Subject: [PATCH] windows: correctly check the result of malloc --- src/win/pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/pipe.c b/src/win/pipe.c index 3bbfa833..5c20fe48 100644 --- a/src/win/pipe.c +++ b/src/win/pipe.c @@ -1047,7 +1047,7 @@ static int uv_pipe_write_impl(uv_loop_t* loop, uv_write_t* req, ipc_header_req = (uv_write_t*)&handle->ipc_header_write_req; } else { ipc_header_req = (uv_write_t*)malloc(sizeof(uv_write_t)); - if (!handle->accept_reqs) { + if (!ipc_header_req) { uv_fatal_error(ERROR_OUTOFMEMORY, "malloc"); } }