Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63799 - trunk/boost/thread/pthread
From: anthony_at_[hidden]
Date: 2010-07-09 18:00:52


Author: anthonyw
Date: 2010-07-09 18:00:51 EDT (Fri, 09 Jul 2010)
New Revision: 63799
URL: http://svn.boost.org/trac/boost/changeset/63799

Log:
Fix for issue #4368 --- ensure mutex is destroyed if setattr call fails
Text files modified:
   trunk/boost/thread/pthread/recursive_mutex.hpp | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: trunk/boost/thread/pthread/recursive_mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/recursive_mutex.hpp (original)
+++ trunk/boost/thread/pthread/recursive_mutex.hpp 2010-07-09 18:00:51 EDT (Fri, 09 Jul 2010)
@@ -60,6 +60,7 @@
             int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
             if(set_attr_res)
             {
+ BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
                 boost::throw_exception(thread_resource_error());
             }
             


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk