X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frouteros.c;h=7ee302487f9dd841c9a35aeac86fef54eb9a597b;hb=dc6f54ccc87c5ae63d29f05eca91714ade689691;hp=667c2fa581722e00ef01161e385d6e13d0c4e36a;hpb=82c9b0daf5ff90d01f4a4371f11727cd613e4b01;p=collectd.git diff --git a/src/routeros.c b/src/routeros.c index 667c2fa5..7ee30248 100644 --- a/src/routeros.c +++ b/src/routeros.c @@ -328,10 +328,9 @@ static int cr_config_router (oconfig_item_t *ci) /* {{{ */ 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;