From d74128761bfde8e08bad23239c69d1a42b053336 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 18:13:59 +0200 Subject: [PATCH] routeros plugin: malloc + memset -> calloc --- src/routeros.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.30.2