]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Close fd of config file after reconfiguration.
authorOndrej Filip <feela@network.cz>
Sun, 24 Aug 2008 23:24:14 +0000 (23:24 +0000)
committerOndrej Filip <feela@network.cz>
Sun, 24 Aug 2008 23:24:14 +0000 (23:24 +0000)
sysdep/unix/main.c

index da1ba37f30d3fc3452feb48f6f712ab7230266af..4df4e9fee63802f512e3d070e323937396505dd8 100644 (file)
@@ -91,13 +91,16 @@ static int
 unix_read_config(struct config **cp, char *name)
 {
   struct config *conf = config_alloc(name);
+  int ret;
 
   *cp = conf;
   conf_fd = open(name, O_RDONLY);
   if (conf_fd < 0)
     return 0;
   cf_read_hook = cf_read;
-  return config_parse(conf);
+  ret = config_parse(conf);
+  close(conf_fd);
+  return ret;
 }
 
 static void