From 14dfeee4ed4fa9cf02594ca471404f5983fb666e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 14 Jul 2020 00:12:07 +0900 Subject: [PATCH] nghttpx: Fix ubsan error --- src/shrpx_downstream.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shrpx_downstream.cc b/src/shrpx_downstream.cc index dc7762d0..2984776c 100644 --- a/src/shrpx_downstream.cc +++ b/src/shrpx_downstream.cc @@ -240,6 +240,10 @@ void Downstream::detach_downstream_connection() { auto handler = dconn_->get_client_handler(); + if (!handler) { + return; + } + handler->pool_downstream_connection( std::unique_ptr(dconn_.release())); }