From: Roy Marples Date: Tue, 16 Dec 2008 13:35:05 +0000 (+0000) Subject: Plug a leak. X-Git-Tag: v5.0.0~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83b738f21f027d549e7501ec2f8426529471f134;p=thirdparty%2Fdhcpcd.git Plug a leak. --- diff --git a/configure.c b/configure.c index 7ab10fcb..769b411a 100644 --- a/configure.c +++ b/configure.c @@ -448,11 +448,12 @@ configure(struct interface *iface, const char *reason) /* We need to delete the subnet route to have our metric or * prefer the interface. */ - if (iface->net.s_addr != INADDR_BROADCAST) { - rt = get_subnet_route(dhcp); + rt = get_subnet_route(dhcp); + if (rt != NULL) { rt->iface = iface; if (!find_route(routes, rt, NULL, NULL)) del_route(iface, &rt->dest, &rt->net, &rt->gate, 0); + free(rt); } build_routes();