Skip to content

Commit 8d04c04

Browse files
authored
Merge pull request trilogy-libraries#266 from byroot/wip-address-realloc-invalid-pointer
Don't pass `ruby_xmalloc` memory to trilogy
2 parents 3963d49 + 34c4a6e commit 8d04c04

File tree

1 file changed

+1
-1
lines changed
  • contrib/ruby/ext/trilogy-ruby

1 file changed

+1
-1
lines changed

contrib/ruby/ext/trilogy-ruby/cext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void buffer_checkout(trilogy_buffer_t *buffer, size_t initial_capacity)
124124
buffer->buff = pool->entries[pool->len].buff;
125125
buffer->cap = pool->entries[pool->len].cap;
126126
} else {
127-
buffer->buff = RB_ALLOC_N(uint8_t, initial_capacity);
127+
buffer->buff = malloc(initial_capacity);
128128
buffer->cap = initial_capacity;
129129
}
130130
}

0 commit comments

Comments
 (0)