You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ki...@apache.org on 2016/11/13 06:08:06 UTC

[trafficserver] branch master updated: TS-5041: fix resource leak in ts_lua

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 <ki...@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" <co...@trafficserver.apache.org>'].