diff options
Diffstat (limited to 'libdimension/raytrace.c')
-rw-r--r-- | libdimension/raytrace.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c index 0f00d24..7c3637e 100644 --- a/libdimension/raytrace.c +++ b/libdimension/raytrace.c @@ -60,8 +60,8 @@ dmnsn_raytrace_scene_async(dmnsn_scene *scene) payload->scene = scene; if (pthread_create(&progress->thread, NULL, &dmnsn_raytrace_scene_thread, - payload) - != 0) { + payload) != 0) + { free(payload); dmnsn_delete_progress(progress); return NULL; @@ -130,8 +130,9 @@ dmnsn_raytrace_scene_multithread(dmnsn_raytrace_payload *payload) payloads[i].threads = nthreads; if (pthread_create(&threads[i], NULL, - &dmnsn_raytrace_scene_multithread_thread, &payloads[i]) - != 0) { + &dmnsn_raytrace_scene_multithread_thread, + &payloads[i]) != 0) + { for (j = 0; j < i; ++j) { if (pthread_join(threads[i], &ptr)) { dmnsn_error(DMNSN_SEVERITY_MEDIUM, |