diff --git a/include/types/applet.h b/include/types/applet.h index 1f3a4983a..8de446cd1 100644 --- a/include/types/applet.h +++ b/include/types/applet.h @@ -105,8 +105,10 @@ struct appctx { const char *msg; /* pointer to a persistent message to be returned in CLI_ST_PRINT state */ int severity; /* severity of the message to be returned according to (syslog) rfc5424 */ char *err; /* pointer to a 'must free' message to be returned in CLI_ST_PRINT_FREE state */ - void *p0, *p1; /* general purpose pointers and integers for registered commands, initialized */ - int i0, i1; /* to 0 by the CLI before first invocation of the keyword parser. */ + struct list l0; /* General purpose list element, pointers, offsets and integers for... */ + void *p0, *p1; /* ...registered commands, initialized to 0 by the CLI before first... */ + size_t o0, o1; /* ...invocation of the keyword parser, except for the list element which... */ + int i0, i1; /* ...is initialized with LIST_INIT(). */ } cli; /* context used by the CLI */ struct { struct cache_entry *entry; /* Entry to be sent from cache. */ diff --git a/src/cli.c b/src/cli.c index 180567149..ddc7f4c73 100644 --- a/src/cli.c +++ b/src/cli.c @@ -498,6 +498,7 @@ static int cli_parse_request(struct appctx *appctx) appctx->st2 = 0; memset(&appctx->ctx.cli, 0, sizeof(appctx->ctx.cli)); + LIST_INIT(&appctx->ctx.cli.l0); p = appctx->chunk->area; end = p + appctx->chunk->data;