Browse Source

2003-07-12 Matthias Ferdinand <mferd@sanet.de>

	* 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()
paul 18 years ago
parent
commit
7f809942da
1 changed files with 2 additions and 1 deletions
  1. 2 1
      zebra/if_proc.c

+ 2 - 1
zebra/if_proc.c

@@ -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;
 }