Skip to content

Commit

Permalink
src: check uv_async_init() return value
Browse files Browse the repository at this point in the history
Pointed out by Coverity.

PR-URL: #7374
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
bnoordhuis authored and Myles Borins committed Jul 14, 2016
1 parent 1baa145 commit c03bd57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3857,9 +3857,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

0 comments on commit c03bd57

Please sign in to comment.