summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-22 13:13:57 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-22 13:13:57 +0000
commit94339a8fd787c1788e72d5f032572860ba5deb05 (patch)
tree97ce2092d623f13ffd5b5faa7b9e922df14483ae /thread_pthread.c
parent3aa7b3fb728a8c60f2177031cbdf58e1cb667e10 (diff)
merge revision(s) 28716:
* thread_pthread.c (get_stack): fix memory leak; pthread_attr_destory must be called even when pthread_getattr_np is used. [ruby-core:31269] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 95fb77a7f8..c2fde5c82e 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -234,9 +234,7 @@ get_stack(void **addr, size_t *size)
# endif
CHECK_ERR(pthread_attr_getguardsize(&attr, &guard));
*size -= guard;
-# ifndef HAVE_PTHREAD_GETATTR_NP
pthread_attr_destroy(&attr);
-# endif
#elif defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP
pthread_t th = pthread_self();
*addr = pthread_get_stackaddr_np(th);