You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/07/18 00:13:17 UTC
[trafficserver] branch master 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.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 7ebf479 Fix for URL obj leak in HTTP2 server push upon calling TSHttpTxnServerPush #2275
7ebf479 is described below
commit 7ebf479e41b517449e70bae628a98702150914a6
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
---
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 8c8aab5..b4614b0 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7641,6 +7641,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);
@@ -7648,6 +7649,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 55dc049..d1639a5 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1515,6 +1515,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>'].