You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2012/02/02 23:39:18 UTC
git commit: [TS-1038] TSHttpTxnErrorBodySet() can still leak memory.
Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1228991
Review: briang, zwoop Test/Backport: igalic (who says: +1, but,
this will not apply, we'll need to change it to
Updated Branches:
refs/heads/3.0.x 83b24117e -> a5cb52d35
[TS-1038] TSHttpTxnErrorBodySet() can still leak memory.
Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1228991
Review: briang, zwoop
Test/Backport: igalic (who says: +1, but, this will not apply, we'll need
to change it to xfree() for 3.0.x)
n.b.: No more credit for the author Brian, who is now a committer :)
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a5cb52d3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a5cb52d3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a5cb52d3
Branch: refs/heads/3.0.x
Commit: a5cb52d353a4d286fa5139f897affd70da30cebd
Parents: 83b2411
Author: Igor Galić <ig...@apache.org>
Authored: Thu Feb 2 23:12:20 2012 +0100
Committer: Igor Galić <ig...@apache.org>
Committed: Thu Feb 2 23:12:20 2012 +0100
----------------------------------------------------------------------
CHANGES | 2 ++
STATUS | 6 ------
proxy/InkAPI.cc | 5 +++++
3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a5cb52d3/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index c85ae6c..87fa7b2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.0.3
+ *) [TS-1038] SHttpTxnErrorBodySet() can leak memory.
+
*) [TS-1095] ts.h.in has incorrect declaration for TSFetchURL
*) [TS-1014] slow log can not print logs well on 32-bit system,
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a5cb52d3/STATUS
----------------------------------------------------------------------
diff --git a/STATUS b/STATUS
index 8930d33..11775fb 100644
--- a/STATUS
+++ b/STATUS
@@ -40,12 +40,6 @@ A list of all bugs open for the next v3.0.2 release can be found at
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
- *) TSHttpTxnErrorBodySet() can still leak memory.
- Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1228991
- Jira: https://issues.apache.org/jira/browse/TS-1038
- +1: briang, zwoop
- igalic says: +1, but, this will not apply, we'll need
- to change it to xfree() for 3.0.x
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a5cb52d3/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 091dee7..fdc5586 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -5237,6 +5237,11 @@ TSHttpTxnErrorBodySet(TSHttpTxn txnp, char *buf, int buflength, char *mimetype)
if (s->internal_msg_buffer)
HttpTransact::free_internal_msg_buffer(s->internal_msg_buffer, s->internal_msg_buffer_fast_allocator_size);
+ if (s->internal_msg_buffer_type) {
+ xfree(s->internal_msg_buffer_type);
+ s->internal_msg_buffer_type = NULL;
+ }
+
s->internal_msg_buffer = buf;
s->internal_msg_buffer_type = mimetype;
s->internal_msg_buffer_size = buflength;