mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUG/MINOR: mux_h1: handle a possible strdup() failure
This defect was found by the coccinelle script "unchecked-strdup.cocci". It can be backported to all supported branches.
This commit is contained in:
parent
89c62693da
commit
a3e6c783cd
@ -5663,7 +5663,11 @@ static int cfg_parse_h1_headers_case_adjust_file(char **args, int section_type,
|
||||
}
|
||||
free(hdrs_map.name);
|
||||
hdrs_map.name = strdup(args[1]);
|
||||
return 0;
|
||||
if (!hdrs_map.name) {
|
||||
memprintf(err, "'%s %s' : out of memory", args[0], args[1]);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* config parser for global "tune.h1.zero-copy-fwd-recv" */
|
||||
|
Loading…
Reference in New Issue
Block a user