MINOR: mworker: calloc mworker_proc structures
Initialize mworker_proc structures to 0 with calloc instead of just
doing a malloc.
diff --git a/src/haproxy.c b/src/haproxy.c
index 3cc5c9c..77efdd5 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1599,7 +1599,7 @@
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 @@
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);