From 030e6c6c9249cfc3e64b923f3f08611cf4559c96 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 16:29:53 +0200 Subject: [PATCH] gmond: malloc + memset -> calloc --- src/gmond.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.30.2