diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-09-08 17:20:05 +0200 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-09-17 09:25:17 -0400 |
| commit | cfc5c565038d3ed00a739135911e6188929c729a (patch) | |
| tree | f6609bb793838c0ffd8b67db7b21ff0d830b4a74 /imemo.c | |
| parent | 3f3497558146c46350b740db2e71fdf28d30c204 (diff) | |
Clear out memory for newly allocated tmpbuf
Diffstat (limited to 'imemo.c')
| -rw-r--r-- | imemo.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; } |
