You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/07/18 06:02:03 UTC

[trafficserver] branch 7.1.x updated: Fix for URL obj leak in HTTP2 server push upon calling TSHttpTxnServerPush #2275

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

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new 367439f  Fix for URL obj leak in HTTP2 server push upon calling TSHttpTxnServerPush #2275
367439f is described below

commit 367439f813a0c28f2015522a34634c7dc1ad3831
Author: Rahul Malik <rm...@linkedin.com>
AuthorDate: Mon Jul 17 13:53:58 2017 -0700

    Fix for URL obj leak in HTTP2 server push upon calling TSHttpTxnServerPush #2275
    
    (cherry picked from commit 7ebf479e41b517449e70bae628a98702150914a6)
---
 proxy/InkAPI.cc                     | 2 ++
 proxy/http2/Http2ConnectionState.cc | 1 +
 2 files changed, 3 insertions(+)

diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 8dfd0ba..54f64bb 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7678,6 +7678,7 @@ TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len)
   URL url_obj;
   url_obj.create(nullptr);
   if (url_obj.parse(url, url_len) == PARSE_RESULT_ERROR) {
+    url_obj.destroy();
     return;
   }
   HttpSM *sm          = reinterpret_cast<HttpSM *>(txnp);
@@ -7685,6 +7686,7 @@ TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len)
   if (stream) {
     stream->push_promise(url_obj);
   }
+  url_obj.destroy();
 }
 
 TSReturnCode
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index dbeea20..12e449e 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1487,6 +1487,7 @@ Http2ConnectionState::send_push_promise_frame(Http2Stream *stream, URL &url)
   Http2Error error(Http2ErrorClass::HTTP2_ERROR_CLASS_NONE);
   stream = this->create_stream(id, error);
   if (!stream) {
+    h2_hdr.destroy();
     return;
   }
   if (Http2::stream_priority_enabled) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].