It's a double pointer, so we should allocate a pointer size, not the entire
struct. This saves roughly 500B per class.
CID 507397
ok jsing
-/* $OpenBSD: crypto_ex_data.c,v 1.2 2024/08/02 14:02:33 tb Exp $ */
+/* $OpenBSD: crypto_ex_data.c,v 1.3 2024/08/03 07:43:33 tb Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
sizeof(struct crypto_ex_data_class))) == NULL)
goto err;
if ((new_class->indexes = calloc(CRYPTO_EX_DATA_MAX_INDEX,
- sizeof(struct crypto_ex_data_index))) == NULL)
+ sizeof(struct crypto_ex_data_index *))) == NULL)
goto err;
new_class->indexes_len = CRYPTO_EX_DATA_MAX_INDEX;
new_class->next_index = 1;