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

This resolves issue libgit2/libgit2#2715
This could only happen if the Packfile was corrupted. We may want to use a  better error message here. Exporting a message like "bitsizeof(long) <= shift" to the user gives them no useful information to debug the issue.