diff options
Diffstat (limited to 'pjlib/src')
-rw-r--r-- | pjlib/src/pj/os_core_unix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index ad6a86c4..f256ded9 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -1088,6 +1088,13 @@ static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name, int type) return PJ_RETURN_OS_ERROR(rc); } + rc = pthread_mutexattr_destroy(&attr); + if (rc != 0) { + pj_status_t status = PJ_RETURN_OS_ERROR(rc); + pthread_mutex_destroy(&mutex->mutex); + return status; + } + #if PJ_DEBUG /* Set owner. */ mutex->nesting_level = 0; |