Skip to content
Next Next commit
src: check uv_async_init() return value
Pointed out by Coverity.

PR-URL: #7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
bnoordhuis committed Jun 29, 2016
commit 5e60ded244fb1651a76070d541de12d5b96d7719
6 changes: 3 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4096,9 +4096,9 @@ void Init(int* argc,

// init async debug messages dispatching
// Main thread uses uv_default_loop
uv_async_init(uv_default_loop(),
&dispatch_debug_messages_async,
DispatchDebugMessagesAsyncCallback);
CHECK_EQ(0, uv_async_init(uv_default_loop(),
&dispatch_debug_messages_async,
DispatchDebugMessagesAsyncCallback));
uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async));

#if defined(NODE_V8_OPTIONS)
Expand Down
6 changes: 3 additions & 3 deletions src/node_win32_etw_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ void init_etw() {
event_write = (EventWriteFunc)GetProcAddress(advapi, "EventWrite");

// create async object used to invoke main thread from callback
uv_async_init(uv_default_loop(),
&dispatch_etw_events_change_async,
etw_events_change_async);
CHECK_EQ(0, uv_async_init(uv_default_loop(),
&dispatch_etw_events_change_async,
etw_events_change_async));
uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_etw_events_change_async));

if (event_register) {
Expand Down