mgmtd: Fix fd leak.

Close fd before returning to avoid leaks.

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
This commit is contained in:
Loganaden Velvindron 2023-03-23 23:07:06 +04:00
parent 6927446645
commit b69017f455

View file

@ -143,6 +143,7 @@ static bool mgmt_history_read_cmt_record_index(void)
} else {
zlog_err("More records found in index file %s",
MGMTD_COMMIT_INDEX_FILE_NAME);
fclose(fp);
return false;
}