In debug_parse_cli_sched(), when debug dev sched has been used with a
count of 0, do not bother allocating a context, as it will never be
used, and the memory will be leaked.
This is a minor problem that only affects a debug command used
incorrectly, and do not need any backport.
This was submitted by Alexandre Laroche, and should fix github issue
*(uint8_t *)ptr = new;
}
+ if (count == 0)
+ return cli_err(appctx, "count must be at least 1.\n");
+
tctx = calloc(count + 2, sizeof(*tctx));
if (!tctx)
goto fail;