summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-06 06:55:34 +0000
committerovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-06 06:55:34 +0000
commitfe1bbdcbef821e960541209003df9a2b1f74bd9d (patch)
tree5a5a57721861eda1fbc122a96a3747cb1d9f49ff
parentd8d718ebbd0fad136c69cd60b2707851b56ea6d9 (diff)
downloadppe42-gcc-fe1bbdcbef821e960541209003df9a2b1f74bd9d.tar.gz
ppe42-gcc-fe1bbdcbef821e960541209003df9a2b1f74bd9d.zip
2000-09-02 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36182 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/gthr-dce.h11
1 files changed, 8 insertions, 3 deletions
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;
}
OpenPOWER on IntegriCloud