this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #239 from darlinghq/fix-alloc-once

Fix alloc_once implementation

authored by

Luboš Doležel and committed by
GitHub
3f15ff9f 73eb79b1

+3 -1
+3 -1
src/libc/os/alloc_once_impl.c
··· 21 21 if (blocks[key] == NULL) 22 22 { 23 23 blocks[key] = malloc(size); 24 - ctor(blocks[key]); 24 + memset(blocks[key], 0, size); 25 + if (ctor != NULL) 26 + ctor(blocks[key]); 25 27 } 26 28 27 29 pthread_mutex_unlock(&mutexes[key]);