mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-17 08:54:41 +00: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
@ -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 New Issue
Block a user