BUG/MINOR: spoe: Fix error handling in spoe_init_appctx()

labels used in goto statement was not called in the right order. Thus if
there is an error during the appctx startup, it is possible to leak a task.

This patch should fix the issue #1703. No backport needed.
This commit is contained in:
Christopher Faulet 2022-05-18 07:42:49 +02:00
parent 7ad27d41b4
commit fa463afa8f

View File

@ -1223,12 +1223,12 @@ spoe_init_appctx(struct appctx *appctx)
struct stream *s;
if ((task = task_new_here()) == NULL)
goto out_free_task;
goto out_error;
task->process = spoe_process_appctx;
task->context = appctx;
if (appctx_finalize_startup(appctx, &agent->spoe_conf->agent_fe, &BUF_NULL) == -1)
goto out_error;
goto out_free_task;
spoe_appctx->owner = appctx;
spoe_appctx->task = task;