mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Close fd of config file after reconfiguration.
This commit is contained in:
parent
85ae398a61
commit
3c3271d9fc
@ -91,13 +91,16 @@ static int
|
|||||||
unix_read_config(struct config **cp, char *name)
|
unix_read_config(struct config **cp, char *name)
|
||||||
{
|
{
|
||||||
struct config *conf = config_alloc(name);
|
struct config *conf = config_alloc(name);
|
||||||
|
int ret;
|
||||||
|
|
||||||
*cp = conf;
|
*cp = conf;
|
||||||
conf_fd = open(name, O_RDONLY);
|
conf_fd = open(name, O_RDONLY);
|
||||||
if (conf_fd < 0)
|
if (conf_fd < 0)
|
||||||
return 0;
|
return 0;
|
||||||
cf_read_hook = cf_read;
|
cf_read_hook = cf_read;
|
||||||
return config_parse(conf);
|
ret = config_parse(conf);
|
||||||
|
close(conf_fd);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user