Merge "Add a call to pthread_attr_destroy to avoid potential memory leaks."
This commit is contained in:
commit
ce071667d0
@ -161,6 +161,7 @@ int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
|
|||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
int result = pthread_create(&thread, &attr,
|
int result = pthread_create(&thread, &attr,
|
||||||
(android_pthread_entry)entryFunction, userData);
|
(android_pthread_entry)entryFunction, userData);
|
||||||
|
pthread_attr_destroy(&attr);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
|
LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
|
||||||
"(android threadPriority=%d)",
|
"(android threadPriority=%d)",
|
||||||
|
Loading…
Reference in New Issue
Block a user