]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2003-07-12 Matthias Ferdinand <mferd@sanet.de>
authorpaul <paul>
Sat, 12 Jul 2003 21:49:25 +0000 (21:49 +0000)
committerpaul <paul>
Sat, 12 Jul 2003 21:49:25 +0000 (21:49 +0000)
* zebra/if_proc.c: zebra does not close the file after reading
          /proc/net/dev for retrieving interface names and statistics.
          call fclose(fp) before returning from ifstat_update_proc()
          or interface_list_proc()

zebra/if_proc.c

index 117859fd99e75905e64335daf3b675e22dd41fa3..6c47d4307616f8e21f72d65e6b4fe477653a4d18 100644 (file)
@@ -161,7 +161,7 @@ ifstat_update_proc ()
       ifp = if_get_by_name (name);
       ifstat_dev_fields (version, stat, ifp);
     }
-
+  fclose(fp);
   return 0;
 }
 
@@ -195,6 +195,7 @@ interface_list_proc ()
       ifp = if_get_by_name (name);
       if_add_update (ifp);
     }
+  fclose(fp);
   return 0;
 }
 \f