X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgmond.c;h=c763cd9686e48f4f456abeb44bce3cd050c4f0fc;hb=030e6c6c9249cfc3e64b923f3f08611cf4559c96;hp=9b5ceb76e1600946bf06007f1126ef2e0b150cd4;hpb=72f3b390dff512e8d891aff6f3fba9ecaeaf970c;p=collectd.git diff --git a/src/gmond.c b/src/gmond.c index 9b5ceb76..c763cd96 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 = 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;