From e3db77df14522b3781fe7e038ccca2cf3a5a73a6 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 1 Apr 2016 17:22:16 +0200 Subject: [PATCH] netlink plugin: malloc + memset -> calloc --- src/netlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/netlink.c b/src/netlink.c index c5f66f83..c8905d5c 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -109,12 +109,10 @@ static int add_ignorelist (const char *dev, const char *type, { ir_ignorelist_t *entry; - entry = malloc (sizeof (*entry)); + entry = calloc (1, sizeof (*entry)); if (entry == NULL) return (-1); - memset (entry, '\0', sizeof (ir_ignorelist_t)); - if (strcasecmp (dev, "All") != 0) { entry->device = strdup (dev); -- 2.11.0