From 6af34f73133f3067c4b6400d50e060b1db1193e7 Mon Sep 17 00:00:00 2001 From: lijunlong Date: Sat, 21 May 2022 16:31:32 +0800 Subject: [PATCH] bugfix: tctx.pool is double freed. --- src/ngx_http_lua_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ngx_http_lua_timer.c b/src/ngx_http_lua_timer.c index 795bd4f5f3..e75b4ad65d 100644 --- a/src/ngx_http_lua_timer.c +++ b/src/ngx_http_lua_timer.c @@ -565,6 +565,8 @@ ngx_http_lua_timer_handler(ngx_event_t *ev) c = ngx_http_lua_create_fake_connection(tctx.pool); if (c == NULL) { errmsg = "could not create fake connection"; + /* tctx.pool is free in ngx_http_lua_create_fake_connection */ + tctx.pool = NULL; goto failed; }