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

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a0707a  fix: set `ngx.ctx` to nil will corrupt the inner 
ngx_lua_ctx_tables (#3182)
4a0707a is described below

commit 4a0707ac28006c1360c337114b6be131ce087d19
Author: 罗泽轩 <[email protected]>
AuthorDate: Mon Jan 4 04:03:40 2021 -0600

    fix: set `ngx.ctx` to nil will corrupt the inner ngx_lua_ctx_tables (#3182)
    
    And it doesn't free the reference which is actually controlled in C
    land.
    
    Signed-off-by: spacewander <[email protected]>
---
 apisix/init.lua | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/apisix/init.lua b/apisix/init.lua
index 1455bd8..8c79c08 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -183,13 +183,8 @@ function _M.http_ssl_phase()
         if err then
             core.log.error("failed to fetch ssl config: ", err)
         end
-        -- clear the ctx of the ssl phase, avoid affecting other phases
-        ngx.ctx = nil
         ngx_exit(-1)
     end
-
-    -- clear the ctx of the ssl phase, avoid affecting other phases
-    ngx.ctx = nil
 end
 
 

Reply via email to