ruby-changes:19434
From: kosaki <ko1@a...>
Date: Sun, 8 May 2011 10:55:08 +0900 (JST)
Subject: [ruby-changes:19434] Ruby:r31474 (trunk): * thread_pthread.c (add_signal_thread_list): use xmalloc instead
kosaki 2011-05-08 10:54:58 +0900 (Sun, 08 May 2011) New Revision: 31474 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31474 Log: * thread_pthread.c (add_signal_thread_list): use xmalloc instead of malloc. * thread_pthread.c (remove_signal_thread_list): use xfree instead of free. Modified files: trunk/ChangeLog trunk/thread_pthread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 31473) +++ ChangeLog (revision 31474) @@ -1,3 +1,10 @@ +Sun May 8 10:54:06 2011 KOSAKI Motohiro <kosaki.motohiro@g...> + + * 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@g...> * thread_pthread.c: cleanup signal_thread_list related ifdef. Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 31473) +++ thread_pthread.c (revision 31474) @@ -897,7 +897,7 @@ 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 @@ } th->native_thread_data.signal_thread_list = 0; list->th = 0; - free(list); /* ok */ + xfree(list); /* ok */ }); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/