OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2585e9b
)
Add a call to pthread_attr_destroy to avoid potential memory leaks.
author
Le-Chun Wu
<lcwu@google.com>
Thu, 14 Jul 2011 21:27:18 +0000
(14:27 -0700)
committer
Jeff Brown
<jeffbrown@google.com>
Fri, 15 Jul 2011 03:14:07 +0000
(20:14 -0700)
Change-Id: Ib57efc3530e9793298190cc9cab19c9af54e11a7
libs/utils/Threads.cpp
patch
|
blob
|
history
diff --git
a/libs/utils/Threads.cpp
b/libs/utils/Threads.cpp
index
50312e7
..
d18c0a2
100644
(file)
--- a/
libs/utils/Threads.cpp
+++ b/
libs/utils/Threads.cpp
@@
-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)",