GIT_INLINE(bool) is_file_or_link(const int filemode)
{
	return (filemode == GIT_FILEMODE_BLOB ||
		filemode == GIT_FILEMODE_BLOB_EXECUTABLE ||
		filemode == GIT_FILEMODE_LINK);
}

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