This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Another patch: Re: objc FAILs under hpux/-threads with gcc-2.96 CVS
- To: ovidiu at cup dot hp dot com (Ovidiu Predescu)
- Subject: Another patch: Re: objc FAILs under hpux/-threads with gcc-2.96 CVS
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Tue, 5 Sep 2000 14:21:18 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
This is the complement to the previous patch. Tested with bootstrap
and check.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-09-02 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* gthr-dce.h (__gthread_objc_mutex_deallocate): Free mutex->backend.
--- gthr-dce.h.orig Fri Sep 1 19:17:41 2000
+++ gthr-dce.h Sat Sep 2 14:37:18 2000
@@ -294,9 +294,14 @@
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;
}