diff options
author | Steven Barth <steven@midlink.org> | 2013-10-15 12:19:48 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-10-15 12:19:48 +0200 |
commit | 8cc7121600eab0e28495e48f559d4886ba879c95 (patch) | |
tree | 3e5078e735f47da77eebac513e7c28dd0811ca27 /src/router.c | |
parent | 7117854698ba7c77da5823fc673f44e6db0fee5f (diff) |
Fix more memory corruption
Diffstat (limited to 'src/router.c')
-rw-r--r-- | src/router.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/router.c b/src/router.c index bb7ddcd..9258acf 100644 --- a/src/router.c +++ b/src/router.c @@ -352,7 +352,7 @@ static void send_router_advert(struct uloop_timeout *event) uint8_t pad2; uint32_t lifetime; uint8_t name[]; - } *search = malloc(sizeof(*search) + search_padded); + } *search = alloca(sizeof(*search) + search_padded); search->type = ND_OPT_DNS_SEARCH; search->len = search_len ? ((sizeof(*search) + search_padded) / 8) : 0; search->pad = 0; @@ -409,7 +409,6 @@ static void send_router_advert(struct uloop_timeout *event) struct sockaddr_in6 all_nodes = {AF_INET6, 0, 0, ALL_IPV6_NODES, 0}; odhcpd_send(router_event.uloop.fd, &all_nodes, iov, ARRAY_SIZE(iov), iface); - free(search); // Rearm timer int msecs; |