mirror of git://gcc.gnu.org/git/gcc.git
gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend.
2000-09-02 J. David Anglin <dave@hiauly1.hia.nrc.ca> * gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend. From-SVN: r36182
This commit is contained in:
parent
84802b1397
commit
6bb92770ab
|
|
@ -294,9 +294,14 @@ __gthread_objc_mutex_allocate(objc_mutex_t mutex)
|
||||||
static inline int
|
static inline int
|
||||||
__gthread_objc_mutex_deallocate(objc_mutex_t mutex)
|
__gthread_objc_mutex_deallocate(objc_mutex_t mutex)
|
||||||
{
|
{
|
||||||
if (__gthread_active_p ()
|
if (__gthread_active_p ())
|
||||||
&& pthread_mutex_destroy((pthread_mutex_t *)mutex->backend))
|
{
|
||||||
return -1;
|
if (pthread_mutex_destroy((pthread_mutex_t *)mutex->backend))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
objc_free(mutex->backend);
|
||||||
|
mutex->backend = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue