mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-11 14:53:05 -05:00
BUG/MINOR: lua: memory leak executing tasks
The struct hlua isn't freed when the task is complete. This patch should be backported in 1.6 and 1.7
This commit is contained in:
parent
33834b15dc
commit
4e7c708612
1 changed files with 3 additions and 0 deletions
|
|
@ -5300,6 +5300,7 @@ static struct task *hlua_process_task(struct task *task)
|
|||
/* finished or yield */
|
||||
case HLUA_E_OK:
|
||||
hlua_ctx_destroy(hlua);
|
||||
free(hlua);
|
||||
task_delete(task);
|
||||
task_free(task);
|
||||
break;
|
||||
|
|
@ -5313,6 +5314,7 @@ static struct task *hlua_process_task(struct task *task)
|
|||
case HLUA_E_ERRMSG:
|
||||
SEND_ERR(NULL, "Lua task: %s.\n", lua_tostring(hlua->T, -1));
|
||||
hlua_ctx_destroy(hlua);
|
||||
free(hlua);
|
||||
task_delete(task);
|
||||
task_free(task);
|
||||
break;
|
||||
|
|
@ -5321,6 +5323,7 @@ static struct task *hlua_process_task(struct task *task)
|
|||
default:
|
||||
SEND_ERR(NULL, "Lua task: unknown error.\n");
|
||||
hlua_ctx_destroy(hlua);
|
||||
free(hlua);
|
||||
task_delete(task);
|
||||
task_free(task);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue