Clear out memory for newly allocated tmpbuf

This commit is contained in:
Peter Zhu 2025-09-08 17:20:05 +02:00
parent 3f34975581
commit cfc5c56503

View File

@ -54,6 +54,9 @@ rb_imemo_tmpbuf_new(void)
VALUE flags = T_IMEMO | (imemo_tmpbuf << FL_USHIFT);
NEWOBJ_OF(obj, rb_imemo_tmpbuf_t, 0, flags, sizeof(rb_imemo_tmpbuf_t), NULL);
obj->ptr = NULL;
obj->cnt = 0;
return (VALUE)obj;
}