int status;
int i;
- router_data = malloc (sizeof (*router_data));
+ router_data = calloc (1, sizeof (*router_data));
if (router_data == NULL)
return (-1);
- memset (router_data, 0, sizeof (*router_data));
router_data->connection = NULL;
router_data->node = NULL;
router_data->service = NULL;
user_data.free_func = (void *) cr_free_data;
if (status == 0)
status = plugin_register_complex_read (/* group = */ NULL, read_name,
- cr_read, /* interval = */ NULL, &user_data);
+ cr_read, /* interval = */ 0, &user_data);
if (status != 0)
cr_free_data (router_data);