diff options
Diffstat (limited to 'gcc/objc/thr-posix.c')
| -rw-r--r-- | gcc/objc/thr-posix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/objc/thr-posix.c b/gcc/objc/thr-posix.c index e2a98d2..efe8bff 100644 --- a/gcc/objc/thr-posix.c +++ b/gcc/objc/thr-posix.c @@ -209,13 +209,13 @@ objc_mutex_allocate(void) _objc_mutex_t mutex; int err = 0; - if (!(mutex = (_objc_mutex_t)__objc_xmalloc(sizeof(struct _objc_mutex)))) + if (!(mutex = (_objc_mutex_t) objc_malloc(sizeof(struct _objc_mutex)))) return NULL; /* Abort if malloc failed. */ err = pthread_mutex_init(&mutex->lock, NULL); if (err != 0) { /* System init failed? */ - free(mutex); /* Yes, free local memory. */ + objc_free(mutex); /* Yes, free local memory. */ return NULL; /* Abort. */ } mutex->owner = NULL; /* No owner. */ @@ -242,7 +242,7 @@ objc_mutex_deallocate(_objc_mutex_t mutex) pthread_mutex_unlock(&mutex->lock); /* Must unlock system mutex.*/ pthread_mutex_destroy(&mutex->lock); /* Free system mutex. */ - free(mutex); /* Free memory. */ + objc_free(mutex); /* Free memory. */ return depth; /* Return last depth. */ } |
