Skip to content

Commit

Permalink
fix asan error for new-delete-type-mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
satoren committed Jun 19, 2024
1 parent e055a87 commit d738aa2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions worker/src/handles/UnixStreamSocketHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ inline static void onClosePipe(uv_handle_t* handle)
delete reinterpret_cast<uv_pipe_t*>(handle);
}

inline static void onCloseShutdown(uv_handle_t* handle)
{
delete reinterpret_cast<uv_shutdown_t*>(handle);
}

inline static void onShutdown(uv_shutdown_t* req, int /*status*/)
{
Expand All @@ -69,7 +65,7 @@ inline static void onShutdown(uv_shutdown_t* req, int /*status*/)
delete req;

// Now do close the handle.
uv_close(reinterpret_cast<uv_handle_t*>(handle), static_cast<uv_close_cb>(onCloseShutdown));
uv_close(reinterpret_cast<uv_handle_t*>(handle), static_cast<uv_close_cb>(onClosePipe));
}

/* Instance methods. */
Expand Down

0 comments on commit d738aa2

Please sign in to comment.