From d5cc61c7f441e41365574ad605d3173882c9936b Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 15:49:57 +0200 Subject: [PATCH] dns plugin: malloc + memset -> calloc --- src/dns.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dns.c b/src/dns.c index f48be009..53fa725e 100644 --- a/src/dns.c +++ b/src/dns.c @@ -94,11 +94,10 @@ static counter_list_t *counter_list_create (counter_list_t **list, { counter_list_t *entry; - entry = malloc (sizeof (*entry)); + entry = calloc (1, sizeof (*entry)); if (entry == NULL) return (NULL); - memset (entry, 0, sizeof (counter_list_t)); entry->key = key; entry->value = value; -- 2.11.0