X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fnetlink.c;h=c8905d5ca10325c1b4100d003b90015315b2ac02;hb=8361c1e963f9184c3c4d87197fd6996d667cdb3f;hp=c5f66f835cd85d130a9f7c25f2e084453c17a34a;hpb=1ebf2f31bd2e080e6f42de640f0a3899a61501c0;p=collectd.git 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);