diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-09-12 15:01:02 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-09-17 09:25:17 -0400 |
| commit | a456e79e06faf36caac20d9b33e92a98613c9d07 (patch) | |
| tree | 1e3bcf9253e6e3ac7cfc2fb12d53464b7e23a14c | |
| parent | 3b2f698432350dadcb87fd4dfb11e1b2c31c36c7 (diff) | |
Clear out memory for newly allocated structs
| -rw-r--r-- | struct.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -837,6 +837,7 @@ struct_alloc(VALUE klass) st->as.heap.ptr = struct_heap_alloc((VALUE)st, n); rb_mem_clear((VALUE *)st->as.heap.ptr, n); st->as.heap.len = n; + st->as.heap.fields_obj = 0; return (VALUE)st; } |
