Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
win: fix buffer leak when using non-zero tcp reads
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Aug 21, 2011
1 parent beaa676 commit 062af9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/win/tcp.c
Expand Up @@ -627,8 +627,8 @@ void uv_process_tcp_read_req(uv_tcp_t* handle, uv_req_t* req) {
if ((handle->flags & UV_HANDLE_READING)) {
handle->flags &= ~UV_HANDLE_READING;
LOOP->last_error = req->error;
buf.base = 0;
buf.len = 0;
buf = (handle->flags & UV_HANDLE_ZERO_READ) ?
uv_buf_init(NULL, 0) : handle->read_buffer;
handle->read_cb((uv_stream_t*)handle, -1, buf);
}
} else {
Expand Down

0 comments on commit 062af9f

Please sign in to comment.