Unverified 提交 81e20991 authored 作者: satoren's avatar satoren 提交者: GitHub

fix asan error for new-delete-type-mismatch (#1411)

上级 e055a870
...@@ -57,11 +57,6 @@ inline static void onClosePipe(uv_handle_t* handle) ...@@ -57,11 +57,6 @@ inline static void onClosePipe(uv_handle_t* handle)
delete reinterpret_cast<uv_pipe_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*/) inline static void onShutdown(uv_shutdown_t* req, int /*status*/)
{ {
auto* handle = req->handle; auto* handle = req->handle;
...@@ -69,7 +64,7 @@ inline static void onShutdown(uv_shutdown_t* req, int /*status*/) ...@@ -69,7 +64,7 @@ inline static void onShutdown(uv_shutdown_t* req, int /*status*/)
delete req; delete req;
// Now do close the handle. // 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. */ /* Instance methods. */
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论