lib: close config files after reading (coverity)

fixes coverity CID# 1564375

Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit f5626596ee)
This commit is contained in:
Christian Hopps 2023-06-06 14:27:04 -04:00 committed by Mergify
parent b615b1094a
commit 7678f2dbc0

View File

@ -2217,6 +2217,8 @@ bool mgmt_vty_read_configs(void)
line_num = 0;
(void)config_from_file(vty, confp, &line_num);
count++;
fclose(confp);
}
snprintf(path, sizeof(path), "%s/mgmtd.conf", frr_sysconfdir);
@ -2240,6 +2242,8 @@ bool mgmt_vty_read_configs(void)
line_num = 0;
(void)config_from_file(vty, confp, &line_num);
count++;
fclose(confp);
}
vty->pending_allowed = false;