]> git.proxmox.com Git - mirror_frr.git/commitdiff
* if_proc.c, ipforward_proc.c, rtread_proc.c: Fix fd leaks.
authorhasso <hasso>
Mon, 7 Mar 2005 08:19:44 +0000 (08:19 +0000)
committerhasso <hasso>
Mon, 7 Mar 2005 08:19:44 +0000 (08:19 +0000)
 [backport candidate]

zebra/ChangeLog
zebra/if_proc.c
zebra/ipforward_proc.c
zebra/rtread_proc.c

index ad8cf7ccb9e0140c72051aabdfc613fce9af9bcf..7c12154529b24333490c690676622c18981ddf31 100644 (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.
index 199a8e70d2c5094d5c10aee8126f608df1ec4e09..504d2f3c05ab222d8a2ae8c0abb8c62798f24110 100644 (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 */
index 443cb1c6e2921fb2c7c107c39607feffcba6ce8e..f83d88c3322c55e4406e02047e9987af4861e8c5 100644 (file)
@@ -141,6 +141,7 @@ ipforward_ipv6 ()
   fgets (buf, 2, fp);
   sscanf (buf, "%d", &ipforwarding);
 
+  fclose (fp);
   return ipforwarding;
 }
 
index 6e021c32a6ef1bbf5a82e1c637687cb15a350e08..491fc98784312541d5c3d9e2e813288977cdb4a6 100644 (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 */