From 6ff281bf14c6be02f1ff681a7c63607b06f1c1d3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 24 Feb 2019 20:34:57 +0100 Subject: Restrict buffer_deinit to scoped allocator --- src/scoped_allocator.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/scoped_allocator.c') diff --git a/src/scoped_allocator.c b/src/scoped_allocator.c index 7e2cb0d..4d40740 100644 --- a/src/scoped_allocator.c +++ b/src/scoped_allocator.c @@ -28,6 +28,13 @@ int scoped_allocator_init(ScopedAllocator *self) { return buffer_init(&self->buffers, NULL); } +static void buffer_deinit(Buffer *self) { + am_free(self->data); + self->data = NULL; + self->size = 0; + self->capacity = 0; +} + void scoped_allocator_deinit(ScopedAllocator *self) { Buffer *buffer; Buffer *buffer_end; -- cgit v1.2.3