cpp-libface
cpp-libface copied to clipboard
File Descriptor Leak through Import
The 'fd' in do_import() was leaked. It caused an issue in a deployment where we were updating the data source every 15 minutes and tried to use the 'import' API to update the data source (without dumping the existing data).
The fix is to have a global 'if_fd' in place of the local 'fd' and close it before opening the file again in do_import.