diff options
Diffstat (limited to 'llvm/lib/Support/Mutex.cpp')
-rw-r--r-- | llvm/lib/Support/Mutex.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Support/Mutex.cpp b/llvm/lib/Support/Mutex.cpp index c70125f108e..7138c7a4b98 100644 --- a/llvm/lib/Support/Mutex.cpp +++ b/llvm/lib/Support/Mutex.cpp @@ -47,10 +47,7 @@ MutexImpl::MutexImpl( bool recursive) { // Declare the pthread_mutex data structures pthread_mutex_t* mutex = - static_cast<pthread_mutex_t*>(malloc(sizeof(pthread_mutex_t))); - - if (mutex == nullptr) - report_bad_alloc_error("Mutex allocation failed"); + static_cast<pthread_mutex_t*>(safe_malloc(sizeof(pthread_mutex_t))); pthread_mutexattr_t attr; |