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 2015/05/19 00:03:43 UTC

[1/2] trafficserver git commit: TS-3617 cache_promote leaks the URL string

Repository: trafficserver
Updated Branches:
  refs/heads/master 79fd950d0 -> 1c6f986ca


TS-3617 cache_promote leaks the URL string


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/21141a2e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/21141a2e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/21141a2e

Branch: refs/heads/master
Commit: 21141a2e6586faabcd68d0c6eb7c5e47c3a53117
Parents: 79fd950
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon May 18 16:02:32 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon May 18 16:02:32 2015 -0600

----------------------------------------------------------------------
 plugins/experimental/cache_promote/cache_promote.cc | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/21141a2e/plugins/experimental/cache_promote/cache_promote.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/cache_promote/cache_promote.cc b/plugins/experimental/cache_promote/cache_promote.cc
index 6b05882..bb49bcd 100644
--- a/plugins/experimental/cache_promote/cache_promote.cc
+++ b/plugins/experimental/cache_promote/cache_promote.cc
@@ -232,8 +232,14 @@ public:
     char *url = TSHttpTxnEffectiveUrlStringGet(txnp, &url_len);
     bool ret = false;
 
+    // Generally shouldn't happen ...
+    if (!url) {
+      return false;
+    }
+
     TSDebug(PLUGIN_NAME, "LRUPolicy::doPromote(%.*s ...)", url_len > 30 ? 30 : url_len, url);
     hash.init(url, url_len);
+    TSfree(url);
 
     // We have to hold the lock across all list and hash access / updates
     TSMutexLock(_lock);


[2/2] trafficserver git commit: Added TS-3617.

Posted by zw...@apache.org.
Added TS-3617.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1c6f986c
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1c6f986c
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1c6f986c

Branch: refs/heads/master
Commit: 1c6f986cae02a605e8e5d0f7b57beca9259f63d2
Parents: 21141a2
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon May 18 16:02:56 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon May 18 16:02:56 2015 -0600

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c6f986c/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 7eb1e0d..59a9b8e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 6.0.0
 
+  *) [TS-3617] cache_promote leaks the URL string.
+
   *) [TS-3581] Remove unused parameters from Cache::remove().
 
   *) [TS-3568] We can now assume unordered_map is always available, just need