trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kic...@apache.org
Subject [trafficserver] branch master updated: TS-5041: fix resource leak in ts_lua
Date Sun, 13 Nov 2016 06:08:06 GMT
This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  4712882   TS-5041: fix resource leak in ts_lua
4712882 is described below

commit 47128820e2bf09a21b2043f3a73923c6b6d3976c
Author: Kit Chan <kichan@apache.org>
AuthorDate: Fri Nov 11 06:51:52 2016 -0800

    TS-5041: fix resource leak in ts_lua
---
 plugins/experimental/ts_lua/ts_lua_http.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/experimental/ts_lua/ts_lua_http.c b/plugins/experimental/ts_lua/ts_lua_http.c
index ff06c34..5563232 100644
--- a/plugins/experimental/ts_lua/ts_lua_http.c
+++ b/plugins/experimental/ts_lua/ts_lua_http.c
@@ -435,10 +435,6 @@ static int
 ts_lua_http_set_parent_proxy(lua_State *L)
 {
   int n = 0;
-  const char *hostname;
-  size_t hostname_len;
-  int port = 0;
-  const char *target;
 
   ts_lua_http_ctx *http_ctx;
 
@@ -447,6 +443,11 @@ ts_lua_http_set_parent_proxy(lua_State *L)
   n = lua_gettop(L);
 
   if (n == 2) {
+    const char *hostname;
+    size_t hostname_len;
+    int port = 0;
+    const char *target;
+
     hostname = luaL_checklstring(L, 1, &hostname_len);
     target   = TSstrndup(hostname, hostname_len);
     port     = luaL_checkinteger(L, 2);

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

Mime
View raw message