mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-22 13:46:52 +00:00
MINOR: mworker: calloc mworker_proc structures
Initialize mworker_proc structures to 0 with calloc instead of just doing a malloc.
This commit is contained in:
parent
9001ce8c2f
commit
f3a86831ae
@ -1599,7 +1599,7 @@ static void init(int argc, char **argv)
|
||||
|
||||
if (getenv("HAPROXY_MWORKER_REEXEC") == NULL) {
|
||||
|
||||
tmproc = malloc(sizeof(*tmproc));
|
||||
tmproc = calloc(1, sizeof(*tmproc));
|
||||
if (!tmproc) {
|
||||
ha_alert("Cannot allocate process structures.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
@ -1619,7 +1619,7 @@ static void init(int argc, char **argv)
|
||||
|
||||
for (proc = 0; proc < global.nbproc; proc++) {
|
||||
|
||||
tmproc = malloc(sizeof(*tmproc));
|
||||
tmproc = calloc(1, sizeof(*tmproc));
|
||||
if (!tmproc) {
|
||||
ha_alert("Cannot allocate process structures.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
Loading…
Reference in New Issue
Block a user