Another patch: Re: objc FAILs under hpux/-threads with gcc-2.96 CVS
John David Anglin
dave@hiauly1.hia.nrc.ca
Tue Sep 5 11:25:00 GMT 2000
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;
}
More information about the Gcc-bugs
mailing list