Permalink
Browse files
windows: fix memory leak when non-zero tcp reads are used
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+2
−1
src/win/tcp.c
|
@@ -822,7 +822,8 @@ void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle, |
|
|
|
|
|
if (!REQ_SUCCESS(req)) { |
|
|
/* An error occurred doing the read. */ |
|
|
if ((handle->flags & UV_HANDLE_READING)) { |
|
|
if ((handle->flags & UV_HANDLE_READING) || |
|
|
!(handle->flags & UV_HANDLE_ZERO_READ)) { |
|
|
handle->flags &= ~UV_HANDLE_READING; |
|
|
buf = (handle->flags & UV_HANDLE_ZERO_READ) ? |
|
|
uv_buf_init(NULL, 0) : handle->read_buffer; |
|
|
0 comments on commit
4e99cd4