X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgmond.c;h=1aa95d5738aa42dc097d1039d6735cb436b2d98b;hb=8361c1e963f9184c3c4d87197fd6996d667cdb3f;hp=f86d8f7add6df91563d6c8cb1f0d692c9ef7e803;hpb=6164fe4456716e6dc36aaa2ab617b104a7ac5ff3;p=collectd.git diff --git a/src/gmond.c b/src/gmond.c index f86d8f7a..1aa95d57 100644 --- a/src/gmond.c +++ b/src/gmond.c @@ -454,10 +454,9 @@ static staging_entry_t *staging_entry_get (const char *host, /* {{{ */ return (se); /* insert new entry */ - se = (staging_entry_t *) malloc (sizeof (*se)); + se = calloc (1, sizeof (*se)); if (se == NULL) return (NULL); - memset (se, 0, sizeof (*se)); sstrncpy (se->key, key, sizeof (se->key)); se->flags = 0; @@ -913,7 +912,7 @@ static int mc_receive_thread_stop (void) /* {{{ */ return (0); } /* }}} int mc_receive_thread_stop */ -/* +/* * Config: * *