*/
ht->next_grow = (ht->num_buckets << 1) + (ht->num_buckets >> 1);
- ht->buckets = talloc_zero_array(NULL, fr_hash_entry_t *, ht->num_buckets);
+ ht->buckets = talloc_zero_array(ht, fr_hash_entry_t *, ht->num_buckets);
if (!ht->buckets) {
talloc_free(ht);
return NULL;
{
fr_hash_entry_t **buckets;
- buckets = talloc_zero_array(NULL, fr_hash_entry_t *, GROW_FACTOR * ht->num_buckets);
+ buckets = talloc_array(ht, fr_hash_entry_t *, GROW_FACTOR * ht->num_buckets);
if (!buckets) return;
memcpy(buckets, ht->buckets, sizeof(*buckets) * ht->num_buckets);
* If we try to do our own memory allocation here, the
* speedup is only ~15% or so, which isn't worth it.
*/
- node = talloc_zero(NULL, fr_hash_entry_t);
+ node = talloc_zero(ht, fr_hash_entry_t);
if (!node) return 0;
node->next = &ht->null;