summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--thread_pthread.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b67fce75da..6a37725567 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun May 8 10:54:06 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread_pthread.c (add_signal_thread_list): use xmalloc instead
+ of malloc.
+ * thread_pthread.c (remove_signal_thread_list): use xfree instead
+ of free.
+
Sun May 8 10:24:16 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread_pthread.c: cleanup signal_thread_list related ifdef.
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 */
});
}
}