* if_proc.c, ipforward_proc.c, rtread_proc.c: Fix fd leaks.

[backport candidate]
This commit is contained in:
hasso 2005-03-07 08:19:44 +00:00
parent 3452d47524
commit 42a66d7c48
4 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2005-03-07 Michael Sandee <voidptr@voidptr.sboost.org>
* if_proc.c, ipforward_proc.c, rtread_proc.c: Fix fd leaks.
2005-03-06 Hasso Tepper <hasso at quagga.net>
* interface.c: Fix CRC and frame errors statistics in Linux.

View File

@ -242,6 +242,7 @@ ifaddr_proc_ipv6 ()
connected_add_ipv6 (ifp, &p.prefix, p.prefixlen, NULL);
}
fclose (fp);
return 0;
}
#endif /* HAVE_IPV6 && HAVE_PROC_NET_IF_INET6 */

View File

@ -141,6 +141,7 @@ ipforward_ipv6 ()
fgets (buf, 2, fp);
sscanf (buf, "%d", &ipforwarding);
fclose (fp);
return ipforwarding;
}

View File

@ -96,6 +96,7 @@ proc_route_read ()
rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, zebra_flags, &p, &gateway, 0, 0, 0, 0);
}
fclose (fp);
return 0;
}
@ -155,6 +156,7 @@ proc_ipv6_route_read ()
rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, zebra_flags, &p, &gateway, 0, 0);
}
fclose (fp);
return 0;
}
#endif /* HAVE_IPV6 */