This commit is contained in:
Justin Ethier 2021-01-07 10:52:58 -08:00
parent d2b500278c
commit 8bf50f1676

View file

@ -29,9 +29,8 @@ bool
ck_array_init(ck_array_t *array, unsigned int mode, ck_array_init(ck_array_t *array, unsigned int mode,
struct ck_malloc *allocator, unsigned int initial_length) struct ck_malloc *allocator, unsigned int initial_length)
{ {
array = malloc(sizeof(ck_array_t)); (*array).hs = hashset_create();
array->hs = hashset_create(); if (pthread_mutex_init(&((*array).lock), NULL) != 0) {
if (pthread_mutex_init(&(array->lock), NULL) != 0) {
fprintf(stderr, "Unable to initialize ck array mutex\n"); fprintf(stderr, "Unable to initialize ck array mutex\n");
exit(1); exit(1);
} }