unix: fix uninitialized memory read in uv__read()
This commit fixes the following valgrind warning: ==26443== Conditional jump or move depends on uninitialised value(s) ==26443== at 0x44AAFF: uv__read (stream.c:872) ==26443== by 0x44ADD4: uv__stream_io (stream.c:1051) ==26443== by 0x4377B8: uv__io_rw (core.c:539) ==26443== by 0x43C761: ev_invoke_pending (ev.c:2145) ==26443== by 0x43724D: uv__poll (core.c:260) ==26443== by 0x437297: uv__run (core.c:269) ==26443== by 0x4372F6: uv_run (core.c:277) ==26443== by 0x42094B: run_test_pipe_ref4 (test-ref.c:334) ==26443== by 0x406551: run_test_part (runner.c:302) ==26443== by 0x405384: main (run-tests.c:57)
This commit is contained in:
parent
c6c691f323
commit
c666b6310d
@ -101,6 +101,8 @@ void uv__stream_init(uv_loop_t* loop,
|
||||
uv_stream_t* stream,
|
||||
uv_handle_type type) {
|
||||
uv__handle_init(loop, (uv_handle_t*)stream, type);
|
||||
stream->read_cb = NULL;
|
||||
stream->read2_cb = NULL;
|
||||
stream->alloc_cb = NULL;
|
||||
stream->close_cb = NULL;
|
||||
stream->connection_cb = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user