You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2020/01/06 21:43:15 UTC

[trafficserver] 02/02: Make sure shutdown_cont_event isn't holding any garbage references.

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

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

commit b0685dbd4d00f303ded4727a74f06d0a7cddcd93
Author: Sudheer Vinukonda <su...@apache.org>
AuthorDate: Fri Sep 27 10:15:41 2019 -0700

    Make sure shutdown_cont_event isn't holding any garbage references.
    
    As it seems like there could be a race condition because the handling of
    HTTP2_SESSION_EVENT_SHUTDOWN_INIT is going through the event loop again
    and therefore may come in after the Session and its
    associated contexts are already cleaned up thus causing an use-after-free possibility
---
 proxy/http2/Http2ConnectionState.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 85245c4..f68db97 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -147,6 +147,7 @@ public:
     in_destroy = true;
     if (shutdown_cont_event) {
       shutdown_cont_event->cancel();
+      shutdown_cont_event = nullptr;
     }
     cleanup_streams();