Project

General

Profile

Bug #2763 ยป diff-thread.txt

Patch to libthread_xu - mneumann, 01/08/2015 02:41 AM

 
diff --git a/lib/libthread_xu/thread/thr_mutex.c b/lib/libthread_xu/thread/thr_mutex.c
index 3ddfacc..617d821 100644
--- a/lib/libthread_xu/thread/thr_mutex.c
+++ b/lib/libthread_xu/thread/thr_mutex.c
@@ -213,8 +213,10 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex)
pthread_mutex_t m;
int ret = 0;
- if (mutex == NULL || *mutex == NULL)
+ if (mutex == NULL)
ret = EINVAL;
+ else if (*mutex == NULL)
+ ret = 0;
else {
/*
* Try to lock the mutex structure, we only need to
    (1-1/1)