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

	 [backport candidate]
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index ad8cf7c..7c12154 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -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.
diff --git a/zebra/if_proc.c b/zebra/if_proc.c
index 199a8e7..504d2f3 100644
--- a/zebra/if_proc.c
+++ b/zebra/if_proc.c
@@ -242,6 +242,7 @@
 
       connected_add_ipv6 (ifp, &p.prefix, p.prefixlen, NULL);
     }
+  fclose (fp);
   return 0;
 }
 #endif /* HAVE_IPV6 && HAVE_PROC_NET_IF_INET6 */
diff --git a/zebra/ipforward_proc.c b/zebra/ipforward_proc.c
index 443cb1c..f83d88c 100644
--- a/zebra/ipforward_proc.c
+++ b/zebra/ipforward_proc.c
@@ -141,6 +141,7 @@
   fgets (buf, 2, fp);
   sscanf (buf, "%d", &ipforwarding);
 
+  fclose (fp);
   return ipforwarding;
 }
 
diff --git a/zebra/rtread_proc.c b/zebra/rtread_proc.c
index 6e021c3..491fc98 100644
--- a/zebra/rtread_proc.c
+++ b/zebra/rtread_proc.c
@@ -96,6 +96,7 @@
       rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, zebra_flags, &p, &gateway, 0, 0, 0, 0);
     }
 
+  fclose (fp);
   return 0;
 }
 
@@ -155,6 +156,7 @@
       rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, zebra_flags, &p, &gateway, 0, 0);
     }
 
+  fclose (fp);
   return 0;
 }
 #endif /* HAVE_IPV6 */