diff options
| author | Christian Hopps <chopps@labn.net> | 2023-06-06 14:27:04 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-06-06 14:39:25 -0400 |
| commit | f5626596ee5e052fc1116536704cd9c9ba5d7552 (patch) | |
| tree | 27876151d8c69c2014e8ed9a58632bca0ebd79cb /lib/vty.c | |
| parent | da877b5cedcb1380f811124788d35242381f91a0 (diff) | |
lib: close config files after reading (coverity)
fixes coverity CID# 1564375
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/vty.c')
| -rw-r--r-- | lib/vty.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |
