X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdns.c;h=53fa725e00786ba6dede47e748a76336c4e86b91;hb=56cfc69d0a124c80036b73c2ef1c192706097faa;hp=fd75dc93a9437fb9bd0d7a580c1937e26f19b859;hpb=9817e7298bd6c364fa17347327af54adf048bd21;p=collectd.git diff --git a/src/dns.c b/src/dns.c index fd75dc93..53fa725e 100644 --- a/src/dns.c +++ b/src/dns.c @@ -34,7 +34,6 @@ #include #include -#include /* * Private data types @@ -95,11 +94,10 @@ static counter_list_t *counter_list_create (counter_list_t **list, { counter_list_t *entry; - entry = (counter_list_t *) malloc (sizeof (counter_list_t)); + entry = calloc (1, sizeof (*entry)); if (entry == NULL) return (NULL); - memset (entry, 0, sizeof (counter_list_t)); entry->key = key; entry->value = value;