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()
diff --git a/zebra/if_proc.c b/zebra/if_proc.c
index 117859f..6c47d43 100644
--- a/zebra/if_proc.c
+++ b/zebra/if_proc.c
@@ -161,7 +161,7 @@
ifp = if_get_by_name (name);
ifstat_dev_fields (version, stat, ifp);
}
-
+ fclose(fp);
return 0;
}
@@ -195,6 +195,7 @@
ifp = if_get_by_name (name);
if_add_update (ifp);
}
+ fclose(fp);
return 0;
}