While writing #4060 I realized there are some operations that can lead to stray temporary files / leaked fds. I wrote a test for the particular scenario, but it might be better to modify the test code to always check for leaked fds and add a bunch of tests that just create / destroy objects. I already manually verified that today after running the whole test suite, there are no leaks, so there is no immediate cause for concern.
Reproduction steps
git_indexer *idx;
git_indexer_new(&idx, ".", 0, NULL, NULL, NULL));
git_indexer_free(idx);
Expected behavior
There are no temporary files in the filesystem.
Actual behavior
There is one leaked fd and one temporary file left in the filesystem.
Version of libgit2 (release number or SHA1)
75db289
Operating system(s) tested
Linux (and Windows https://ci.appveyor.com/project/libgit2/libgit2/build/3023 )
While writing #4060 I realized there are some operations that can lead to stray temporary files / leaked fds. I wrote a test for the particular scenario, but it might be better to modify the test code to always check for leaked fds and add a bunch of tests that just create / destroy objects. I already manually verified that today after running the whole test suite, there are no leaks, so there is no immediate cause for concern.
Reproduction steps
Expected behavior
There are no temporary files in the filesystem.
Actual behavior
There is one leaked fd and one temporary file left in the filesystem.
Version of libgit2 (release number or SHA1)
75db289
Operating system(s) tested
Linux (and Windows https://ci.appveyor.com/project/libgit2/libgit2/build/3023 )