You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2018/05/15 13:54:27 UTC

[trafficserver] branch master updated: Get rid of small memory leak in compress plugin.

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

amc 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 a3ef3b0  Get rid of small memory leak in compress plugin.
a3ef3b0 is described below

commit a3ef3b0383d387adf185ca1fd775b03e99bcee8a
Author: Walt Karas <wk...@oath.com>
AuthorDate: Mon May 14 22:50:05 2018 +0000

    Get rid of small memory leak in compress plugin.
---
 plugins/compress/compress.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/plugins/compress/compress.cc b/plugins/compress/compress.cc
index 34c1909..612714e 100644
--- a/plugins/compress/compress.cc
+++ b/plugins/compress/compress.cc
@@ -1009,7 +1009,10 @@ TSPluginInit(int argc, const char *argv[])
   }
 
   info("TSPluginInit %s", argv[0]);
-  global_hidden_header_name = init_hidden_header_name();
+
+  if (!global_hidden_header_name) {
+    global_hidden_header_name = init_hidden_header_name();
+  }
 
   TSCont management_contp = TSContCreate(management_update, nullptr);
 
@@ -1059,7 +1062,9 @@ TSRemapNewInstance(int argc, char *argv[], void **instance, char *errbuf, int er
   } else {
     config_path = TSstrdup(3 == argc ? argv[2] : "");
   }
-  global_hidden_header_name = init_hidden_header_name();
+  if (!global_hidden_header_name) {
+    global_hidden_header_name = init_hidden_header_name();
+  }
 
   Configuration *config = Configuration::Parse(config_path);
   *instance             = config;

-- 
To stop receiving notification emails like this one, please contact
amc@apache.org.