test: fix pthread memory leak
When the thread attributes object returned by pthread_getattr_np() is no longer required, it should be destroyed using pthread_attr_destroy(). PR-URL: https://github.com/libuv/libuv/pull/2583 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
6432886e0d
commit
bbb8b1ffac
@ -232,6 +232,7 @@ static void thread_check_stack(void* arg) {
|
||||
if (expected == 0)
|
||||
expected = (size_t)lim.rlim_cur;
|
||||
ASSERT(stack_size >= expected);
|
||||
ASSERT(0 == pthread_attr_destroy(&attr));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user