summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-08 01:54:58 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-08 01:54:58 +0000
commitc878761f3b992366d4da92d6120d28070281081a (patch)
tree9979d64066e721d05bb91e49e180e9915080a33d /thread_pthread.c
parenta3fd4cf507a137e78366c6d1190ddd584bc48b4a (diff)
* thread_pthread.c (add_signal_thread_list): use xmalloc instead
of malloc. * thread_pthread.c (remove_signal_thread_list): use xfree instead of free. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 466fe36009..f8c19c0835 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -897,7 +897,7 @@ add_signal_thread_list(rb_thread_t *th)
if (!th->native_thread_data.signal_thread_list) {
FGLOCK(&signal_thread_list_lock, {
struct signal_thread_list *list =
- malloc(sizeof(struct signal_thread_list));
+ xmalloc(sizeof(struct signal_thread_list));
if (list == 0) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
@@ -932,7 +932,7 @@ remove_signal_thread_list(rb_thread_t *th)
}
th->native_thread_data.signal_thread_list = 0;
list->th = 0;
- free(list); /* ok */
+ xfree(list); /* ok */
});
}
}