scunz/libgit2 — pull request #2 by scunz (2012-11-18 08:20:41+00:00)
Title: Indexer: Avoid a possible double-deletion in error case

In `indexer.c:hash_and_save()`, we insert a malloc'ed pointer into the `idx->pack->cache` vector.

If the following [call](https://github.com/libgit2/libgit2/blob/development/src/indexer.c#L259) to `git_mwindow_open` fails, `pentry` will be freed, but not removed from the vector.
A later call to `git_indexer_stream_free` would try to free it again.