X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_assign.c;h=a73fc23892aa37961de60c409d6b2dbae0d11d49;hp=24a704b242583de6f6894b4d534426124d4f9aa9;hb=92e8d9d64a97e2d098cefa223208b2d18118194e;hpb=e95ee42934238b371441a463d56f73899ce62867 diff --git a/tests/test_urcu_assign.c b/tests/test_urcu_assign.c index 24a704b..a73fc23 100644 --- a/tests/test_urcu_assign.c +++ b/tests/test_urcu_assign.c @@ -399,7 +399,7 @@ int main(int argc, char **argv) printf_verbose("thread %-6s, thread id : %lx, tid %lu\n", "main", pthread_self(), (unsigned long)gettid()); - test_array = malloc(sizeof(*test_array) * ARRAY_SIZE); + test_array = calloc(1, sizeof(*test_array) * ARRAY_SIZE); tid_reader = malloc(sizeof(*tid_reader) * nr_readers); tid_writer = malloc(sizeof(*tid_writer) * nr_writers); count_reader = malloc(sizeof(*count_reader) * nr_readers);