diff options
Diffstat (limited to 'src/peer_hashtable.c')
-rw-r--r-- | src/peer_hashtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peer_hashtable.c b/src/peer_hashtable.c index 100e8a3..b835ea9 100644 --- a/src/peer_hashtable.c +++ b/src/peer_hashtable.c @@ -44,7 +44,7 @@ void fastd_peer_hashtable_init(void) { fastd_random_bytes(&ctx.peer_addr_ht_seed, sizeof(ctx.peer_addr_ht_seed), false); - ctx.peer_addr_ht = malloc(sizeof(*ctx.peer_addr_ht) * PEER_ADDR_HT_SIZE); + ctx.peer_addr_ht = fastd_new_array(PEER_ADDR_HT_SIZE, __typeof__(*ctx.peer_addr_ht)); size_t i; for (i = 0; i < PEER_ADDR_HT_SIZE; i++) |