mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-18 13:31:11 +01:00
BUG/MINOR: haterm: missing allocation check in copy_argv()
This is a very minor bug with a very low probability of occurring. However, it could be flagged by a static analyzer or result in a small contribution, which is always time-consuming for very little gain.
This commit is contained in:
parent
92581043fb
commit
db360d466b
@ -474,6 +474,9 @@ void haproxy_init_args(int argc, char **argv)
|
||||
char **copy_argv(int argc, char **argv)
|
||||
{
|
||||
char **ret = calloc(1, sizeof(*ret));
|
||||
*ret = strdup("");
|
||||
|
||||
if (*ret)
|
||||
*ret = strdup("");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user