Do not try to use a pthread_mutexattr_t variable
without first initializing it with
pthread_mutexattr_init(3)
The patch allows libjingle to compile under FreeBSD and
possibly other OSs which strictly follow the pthreads
standard which says nothing about pthread_mutexattr_t
other than there is a function to do it. Therefore,
assuming that using pthread_mutexattr_t without
initializing it is not guaranteed to work.
Logged In: YES
user_id=746415
Affected file:
talk/base/criticalsection.h
Logged In: YES
user_id=746415
Furthermore, there should be a matching
pthread_mutexattr_destroy() for each
pthread_mutexattr_init().
Affected file:
talk/base/thread.cc
Add matching pthread_mutexattr_destroy() for each pthread_mutexattr_init()
FIXES CRASH: Both pthread_mutexattr_init() and pthread_mutexattr_destroy() a phtread_mutexattr_t variable.
Add matching pthread_mutexattr_destroy() for each pthread_mutexattr_init()
Logged In: YES
user_id=746415
Affected file:
talk/session/phone/linphonemediaengine.cc
Logged In: YES
user_id=746415
Also, every pthread_mutexattr_init() requires a matching
pthread_mutexattr_destroy() since the definition of
pthread_mutexattr_t is unknown