diff options
author | Ondrej Filip <feela@network.cz> | 2008-08-25 01:24:14 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2008-08-25 01:24:14 +0200 |
commit | 3c3271d9fce8cdd614f1d1b24bcebb3599aad930 (patch) | |
tree | f60450180323d17b8729370ab388a5363e88a721 | |
parent | 85ae398a61184d8f7a353eacaa6aefd3422dfd71 (diff) | |
download | bird-3c3271d9fce8cdd614f1d1b24bcebb3599aad930.tar bird-3c3271d9fce8cdd614f1d1b24bcebb3599aad930.zip |
Close fd of config file after reconfiguration.
-rw-r--r-- | sysdep/unix/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index da1ba37..4df4e9f 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -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 |