chiark / gitweb /
ipif/service.c: Don't leak file descriptors for config files.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 23 Sep 2017 20:56:06 +0000 (21:56 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 26 Sep 2017 01:22:28 +0000 (02:22 +0100)
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
ipif/service.c

index ca02330..abc1431 100644 (file)
@@ -460,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) {