Skip to content
Snippets Groups Projects
Unverified Commit d35305b3 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by GitHub
Browse files

Merge pull request #3037 from Emantor/topic/gluon-adv-filterd-alloc

gluon-radv-filterd: replace malloc with calloc
parents c2fc4e5a 56cde733
No related branches found
No related tags found
No related merge requests found
......@@ -306,16 +306,13 @@ static struct router *router_find_orig(const struct ether_addr *orig) {
static struct router *router_add(const struct ether_addr *mac) {
struct router *router;
router = malloc(sizeof(*router));
router = calloc(1, sizeof(*router));
if (!router)
return NULL;
router->src = *mac;
router->next = G.routers;
G.routers = router;
router->eol.tv_sec = 0;
router->eol.tv_nsec = 0;
memset(&router->originator, 0, sizeof(router->originator));
return router;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment