From: Felix Fietkau Date: Mon, 18 Jun 2012 21:16:25 +0000 (+0200) Subject: fix a memleak in host route dependency handling X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a11944f52c85af49401c7b8f2b22a8a7c96794a9;p=oweals%2Fnetifd.git fix a memleak in host route dependency handling --- diff --git a/interface-ip.c b/interface-ip.c index 14feb6f..3957b48 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -160,8 +160,10 @@ interface_ip_add_target_route(union if_addr *addr, bool v6) interface_ip_find_route_target(iface, addr, v6, &r_next); } - if (!r_next) + if (!r_next) { + free(route); return NULL; + } iface = r_next->iface; memcpy(&route->nexthop, &r_next->nexthop, sizeof(route->nexthop));