gc.c (clear_error_object): need to mark class of error objects; ref #5789

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-09-13 22:20:34 +09:00
parent b5677bff1f
commit 97a419f540
+1
View File
@@ -1108,6 +1108,7 @@ clear_error_object(mrb_state *mrb, struct RObject *obj)
if (obj == 0) return;
if (!is_white(obj)) return;
paint_black(obj);
mrb_gc_mark(mrb, (struct RBasic*)obj->c);
mrb_gc_free_iv(mrb, obj);
struct RException *err = (struct RException*)obj;
err->iv = NULL;