aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_trace.c b/vm_trace.c
index 9c77153c3e..75988060fd 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1390,7 +1390,7 @@ rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void
{
rb_thread_t *th = GET_THREAD();
rb_vm_t *vm = th->vm;
- rb_postponed_job_t *pjob = (rb_postponed_job_t *)malloc(sizeof(rb_postponed_job_t)); /* postponed_job should be separated with Ruby's GC */
+ rb_postponed_job_t *pjob = (rb_postponed_job_t *)ruby_xmalloc(sizeof(rb_postponed_job_t));
if (pjob == NULL) return 0; /* failed */
pjob->flags = flags;
@@ -1429,7 +1429,7 @@ rb_postponed_job_flush(rb_vm_t *vm)
while (pjob) {
next_pjob = pjob->next;
pjob->func(pjob->data);
- free(pjob); /* postponed_job should be separated with Ruby's GC */
+ ruby_xfree(pjob); /* postponed_job should be separated with Ruby's GC */
pjob = next_pjob;
}
}