unsigned git_index_version(git_index *index)
{
	assert(index);

	return index->version;
}

The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.