windows: correctly check the result of malloc

This commit is contained in:
Igor Zinkovsky 2011-12-12 12:15:29 -08:00
parent 4e99cd4e29
commit a4c8ffa3c2

View File

@ -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");
}
}