Skip to content

Commit

Permalink
Don't create final job if dfree is null
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Oct 7, 2024
1 parent b09d5fb commit ace1bc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gc/mmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ gc_run_finalizers(void *data)
void
rb_gc_impl_make_zombie(void *objspace_ptr, VALUE obj, void (*dfree)(void *), void *data)
{
if (dfree == NULL) return;

struct objspace *objspace = objspace_ptr;

struct MMTk_final_job *job = xmalloc(sizeof(struct MMTk_final_job));
Expand Down

0 comments on commit ace1bc7

Please sign in to comment.