X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/4f28e77ed21e75fcfb30e2f8d1d2b9b1657f44c6..64f5ae57aece3480ab79a93fc1b310e8b5ce22e9:/netlink.c diff --git a/netlink.c b/netlink.c index 07c1468..6016864 100644 --- a/netlink.c +++ b/netlink.c @@ -386,7 +386,7 @@ static uint16_t netlink_icmp_reply_len(struct buffer_if *buf) /* We include the first 8 bytes of the packet data, provided they exist */ hlen+=8; plen=ntohs(iph->tot_len); - return (hlen>plen?plen:hlen); + return MIN(hlen,plen); } /* client indicates where the packet we're constructing a response to @@ -976,7 +976,6 @@ static void netlink_output_subnets(struct netlink *st, uint32_t loglevel, for (i=0; ientries; i++) { net=subnet_to_string(snets->list[i]); Message(loglevel,"%s ",net); - free(net); } } @@ -1014,7 +1013,6 @@ static void netlink_dump_routes(struct netlink *st, bool_t requested) for (i=0; isubnets->entries; i++) { net=subnet_to_string(st->subnets->list[i]); Message(c,"%s ",net); - free(net); } if (i>0) Message(c,"-> host (use %d)\n",st->outcount);