mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-24 13:42:16 +00:00
CLEANUP: cfgparse: Fix type of second calloc() parameter
`curr_idle_thr` is of type `unsigned int`, not `int`. Fix this issue by
taking the size of the dereferenced `curr_idle_thr` array.
This issue was introduced when adding the `curr_idle_thr` struct member
in commit f131481a0a
. This commit is first
tagged in 2.0-dev1 and marked for backport to 1.9.
This commit is contained in:
parent
03e7853581
commit
017484c80f
@ -3654,7 +3654,7 @@ out_uri_auth_compat:
|
|||||||
goto err;
|
goto err;
|
||||||
for (i = 0; i < global.nbthread; i++)
|
for (i = 0; i < global.nbthread; i++)
|
||||||
MT_LIST_INIT(&newsrv->idle_orphan_conns[i]);
|
MT_LIST_INIT(&newsrv->idle_orphan_conns[i]);
|
||||||
newsrv->curr_idle_thr = calloc(global.nbthread, sizeof(int));
|
newsrv->curr_idle_thr = calloc(global.nbthread, sizeof(*newsrv->curr_idle_thr));
|
||||||
if (!newsrv->curr_idle_thr)
|
if (!newsrv->curr_idle_thr)
|
||||||
goto err;
|
goto err;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user