Skip to content
Snippets Groups Projects
Commit 5aa88d8f authored by spruett3's avatar spruett3
Browse files

Fixed memory leak in psum_test

parent 3063cec3
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,7 @@ parallel_sum(struct thread_pool * pool, void * _data) ...@@ -50,6 +50,7 @@ parallel_sum(struct thread_pool * pool, void * _data)
struct future * f = thread_pool_submit(pool, parallel_sum, &right_half); struct future * f = thread_pool_submit(pool, parallel_sum, &right_half);
uintptr_t lresult = (uintptr_t) parallel_sum(pool, &left_half); uintptr_t lresult = (uintptr_t) parallel_sum(pool, &left_half);
uintptr_t rresult = (uintptr_t) future_get(f); uintptr_t rresult = (uintptr_t) future_get(f);
future_free(f);
return (void *)(lresult + rresult); return (void *)(lresult + rresult);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment