p11_index_free (p11_index *index)
{
	int i;

	return_if_fail (index != NULL);

	p11_dict_free (index->objects);
	p11_dict_free (index->changes);
	if (index->buckets) {
		for (i = 0; i < NUM_BUCKETS; i++)
			free (index->buckets[i].elem);
		free (index->buckets);
	}
	free (index);
}
p11_index_free (p11_index *index)
{
	int i;

	return_if_fail (index != NULL);

	p11_dict_free (index->objects);
	p11_dict_free (index->changes);
	if (index->buckets) {
		for (i = 0; i < NUM_BUCKETS; i++)
			free (index->buckets[i].elem);
		free (index->buckets);
	}
	free (index);
}