diff --git a/src/powerdns.c b/src/powerdns.c
index ab62dcfdd646ef43077eeb9ce7ac5d17c789fcf7..1c41ff8d62ab31a5dca62ee5ac5f0746b8c2ad89 100644 (file)
--- a/src/powerdns.c
+++ b/src/powerdns.c
return (-1);
assert (buffer_size > 0);
- buffer = (char *) malloc (buffer_size);
+ buffer = malloc (buffer_size);
if (buffer == NULL)
{
FUNC_ERROR ("malloc");
return (-1);
}
- item = (list_item_t *) malloc (sizeof (list_item_t));
+ item = calloc (1, sizeof (*item));
if (item == NULL)
{
- ERROR ("powerdns plugin: malloc failed.");
+ ERROR ("powerdns plugin: calloc failed.");
return (-1);
}
- memset (item, '\0', sizeof (list_item_t));
item->instance = strdup (ci->values[0].value.string);
if (item->instance == NULL)