Commit b8cd8364 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

tests/dthreads: fix possible NULL dereference

parent 91e4bce2
......@@ -87,8 +87,9 @@ int main(int argc, char *argv[])
pthread_mutex_init(&_destructor_mx, NULL);
/* Test 1: Create unit */
dt_unit_t *unit = dt_create(2, &runnable, NULL, NULL);
ok(unit != NULL, "dthreads: create unit (size %d)", unit->size);
int size = 2;
dt_unit_t *unit = dt_create(size, &runnable, NULL, NULL);
ok(unit != NULL, "dthreads: create unit (size %d)", size);
if (unit == NULL) {
skip_block(7, "No dthreads unit");
goto skip_all;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment