diff --git a/src/debug.c b/src/debug.c index 2987d36ef..3b15007b8 100644 --- a/src/debug.c +++ b/src/debug.c @@ -2048,6 +2048,8 @@ static int debug_parse_cli_memstats(char **args, char *payload, struct appctx *a else if (strcmp(args[arg], "match") == 0 && *args[arg + 1]) { ha_free(&ctx->match); ctx->match = strdup(args[arg + 1]); + if (!ctx->match) + return cli_err(appctx, "Out of memory.\n"); arg++; continue; }