From d738aa242b31f7b69d51ee0910e213e03e0afdbb Mon Sep 17 00:00:00 2001 From: satoren Date: Wed, 19 Jun 2024 08:20:31 +0000 Subject: [PATCH] fix asan error for new-delete-type-mismatch --- worker/src/handles/UnixStreamSocketHandle.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/worker/src/handles/UnixStreamSocketHandle.cpp b/worker/src/handles/UnixStreamSocketHandle.cpp index 1696cb3736..ae5241030d 100644 --- a/worker/src/handles/UnixStreamSocketHandle.cpp +++ b/worker/src/handles/UnixStreamSocketHandle.cpp @@ -57,10 +57,6 @@ inline static void onClosePipe(uv_handle_t* handle) delete reinterpret_cast(handle); } -inline static void onCloseShutdown(uv_handle_t* handle) -{ - delete reinterpret_cast(handle); -} inline static void onShutdown(uv_shutdown_t* req, int /*status*/) { @@ -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(handle), static_cast(onCloseShutdown)); + uv_close(reinterpret_cast(handle), static_cast(onClosePipe)); } /* Instance methods. */