chiark / gitweb /
ipif/service.c: Don't leak file descriptors for config files.
[userv-utils.git] / ipif / service.c
index eacfc63c1ce4d9782d7823716ec5b71281c55f13..abc143188f93cf3553595d0b5c1308ac3fb70bee 100644 (file)
@@ -1,14 +1,6 @@
 /*
  * userv service (or standalone program) for per-user IP subranges.
  *
- * When invoked appropriately, it creates a point-to-point network
- * interface with specified parameters.  It arranges for packets sent out
- * via that interface by the kernel to appear on its own stdout in SLIP or
- * CSLIP encoding, and packets injected into its own stdin to be given to
- * the kernel as if received on that interface.  Optionally, additional
- * routes can be set up to arrange for traffic for other address ranges to
- * be routed through the new interface.
- *
  * This is the service program, which is invoked as root from userv (or may
  * be invoked firectly).
  *
@@ -468,6 +460,7 @@ static void pfile(const char *filename) {
     badusage("failed while reading configuration file: %s", strerror(errno));
 
   cpplace= npp.parent;
+  fclose(file);
 }
 
 static void pconfig(const char *configstr, int truncated) {