From: J. David Anglin Date: Wed, 6 Sep 2000 06:55:34 +0000 (+0000) Subject: gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bb92770abcb667b75d336a1b5d2ff300e305bd0;p=gcc.git gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend. 2000-09-02 J. David Anglin * gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend. From-SVN: r36182 --- diff --git a/gcc/gthr-dce.h b/gcc/gthr-dce.h index c2c24cdfe31..761b9482c63 100644 --- a/gcc/gthr-dce.h +++ b/gcc/gthr-dce.h @@ -294,9 +294,14 @@ __gthread_objc_mutex_allocate(objc_mutex_t mutex) static inline int __gthread_objc_mutex_deallocate(objc_mutex_t mutex) { - if (__gthread_active_p () - && pthread_mutex_destroy((pthread_mutex_t *)mutex->backend)) - return -1; + if (__gthread_active_p ()) + { + if (pthread_mutex_destroy((pthread_mutex_t *)mutex->backend)) + return -1; + + objc_free(mutex->backend); + mutex->backend = NULL; + } return 0; }