You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2021/10/29 12:51:32 UTC

[trafficserver] 01/01: UnixNetVConnection: add chek for nh in fail block

This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch check_nh
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 18fc12a53102546763ef6310b93636222d3fb3d7
Author: Brian Olsen <br...@comcast.com>
AuthorDate: Fri Oct 29 12:51:00 2021 +0000

    UnixNetVConnection: add chek for nh in fail block
---
 iocore/net/UnixNetVConnection.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 0bb3ecf..7fbee0a 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1238,7 +1238,9 @@ fail:
   if (fd != NO_FD) {
     con.fd = NO_FD;
   }
-  nh->free_netevent(this);
+  if (nullptr != nh) {
+    nh->free_netevent(this);
+  }
   return CONNECT_FAILURE;
 }