From aaaacaaf4b558f4e0206b98c787cdcef773b1d76 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin Date: Mon, 5 Aug 2024 20:59:09 +0200 Subject: [PATCH] BUG/MINOR: fcgi-app: handle a possible strdup() failure This defect was found by the coccinelle script "unchecked-strdup.cocci". It can be backported to 2.2. --- src/fcgi-app.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fcgi-app.c b/src/fcgi-app.c index b3a9b7c59..98077b959 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -606,6 +606,8 @@ static int proxy_parse_use_fcgi_app(char **args, int section, struct proxy *curp if (!fcgi_conf) goto err; fcgi_conf->name = strdup(args[1]); + if (!fcgi_conf->name) + goto err; LIST_INIT(&fcgi_conf->param_rules); LIST_INIT(&fcgi_conf->hdr_rules);