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 2021/01/27 23:01:02 UTC

[trafficserver] 02/04: Fix lua plugin mem leak problem (#7158)

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

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit e90937c4fcc3cc498ba394a7c91d98c618a77110
Author: Kit Chan <ki...@apache.org>
AuthorDate: Wed Sep 2 11:05:20 2020 -0700

    Fix lua plugin mem leak problem (#7158)
    
    (cherry picked from commit 038b4d075378eb2ff318f079ff6170b36f7491bb)
---
 plugins/lua/ts_lua_mgmt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/lua/ts_lua_mgmt.c b/plugins/lua/ts_lua_mgmt.c
index c322529..e403c35 100644
--- a/plugins/lua/ts_lua_mgmt.c
+++ b/plugins/lua/ts_lua_mgmt.c
@@ -101,6 +101,7 @@ ts_lua_mgmt_get_string(lua_State *L)
   name = luaL_checklstring(L, 1, &name_len);
   if (TS_SUCCESS == TSMgmtStringGet(name, &str_val)) {
     lua_pushstring(L, str_val);
+    TSfree(str_val);
     return 1;
   }