Add a call to pthread_attr_destroy to avoid potential memory leaks.

Change-Id: Ib57efc3530e9793298190cc9cab19c9af54e11a7
This commit is contained in:
Le-Chun Wu 2011-07-14 14:27:18 -07:00 committed by Alex Ray
parent bbbd761de1
commit d8734d19ec
1 changed files with 1 additions and 0 deletions

View File

@ -161,6 +161,7 @@ int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
pthread_t thread;
int result = pthread_create(&thread, &attr,
(android_pthread_entry)entryFunction, userData);
pthread_attr_destroy(&attr);
if (result != 0) {
LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
"(android threadPriority=%d)",