Skip to content

Commit

Permalink
fix asan error for new-delete-type-mismatch (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
satoren authored Jun 19, 2024
1 parent e055a87 commit 81e2099
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions worker/src/handles/UnixStreamSocketHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,14 @@ 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*/)
{
auto* handle = req->handle;

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 81e2099

Please sign in to comment.