diff options
| author | 2011-07-14 22:31:27 -0700 | |
|---|---|---|
| committer | 2011-07-14 22:31:27 -0700 | |
| commit | ce071667d0e436017411bda4f6791d6c80decac4 (patch) | |
| tree | ab847cb2abefdd74a208e7bab5a976a7ef5e9362 /libs/utils/Threads.cpp | |
| parent | 209646dfe7ed002740bff0371316370fa3269211 (diff) | |
| parent | 3919950de8b54d4781c09e711fd2afabab452e69 (diff) | |
Merge "Add a call to pthread_attr_destroy to avoid potential memory leaks."
Diffstat (limited to 'libs/utils/Threads.cpp')
| -rw-r--r-- | libs/utils/Threads.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index 50312e7bb7..d18c0a2f5a 100644 --- 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)", |