Fix for memory leak issue in indexer.c, that surfaces on windows

This resolves issue libgit2/libgit2#2715