summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c72172)
raw | patch | inline | side by side (parent: 3c72172)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:33:34 +0000 (18:33 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 16:33:34 +0000 (18:33 +0200) |
src/varnish.c | patch | blob | history |
diff --git a/src/varnish.c b/src/varnish.c
index aee72471a4d6b62d8e8d13266b47e8ff742b34a0..d7da95a35b629a4207597327c6d45f9114221f61 100644 (file)
--- a/src/varnish.c
+++ b/src/varnish.c
if (have_instance)
return (0);
- conf = malloc (sizeof (*conf));
+ conf = calloc (1, sizeof (*conf));
if (conf == NULL)
return (ENOMEM);
- memset (conf, 0, sizeof (*conf));
/* Default settings: */
conf->instance = NULL;
char callback_name[DATA_MAX_NAME_LEN];
int i;
- conf = malloc (sizeof (*conf));
+ conf = calloc (1, sizeof (*conf));
if (conf == NULL)
return (ENOMEM);
- memset (conf, 0, sizeof (*conf));
conf->instance = NULL;
varnish_config_apply_default (conf);