Fix last few leaks, add leak checking to all randomized specs

This commit is contained in:
Max Brunsfeld 2016-02-05 11:18:22 -08:00
parent f6f02182c1
commit 2f2ca401be
3 changed files with 36 additions and 24 deletions

View file

@ -28,6 +28,9 @@ static inline Vector vector_new(size_t element_size) {
}
static inline bool vector_grow(Vector *self, size_t capacity) {
if (capacity == 0)
return true;
void *new_contents;
if (self->contents)
new_contents = ts_realloc(self->contents, capacity * self->element_size);