summaryrefslogtreecommitdiff
path: root/src/source.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/source.cc')
-rw-r--r--src/source.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/source.cc b/src/source.cc
index 30290f4..c13fefc 100644
--- a/src/source.cc
+++ b/src/source.cc
@@ -43,7 +43,8 @@ bool buffer_init(Buffer* buffer, const Allocator* allocator,
void buffer_deinit(Buffer* buffer) {
slice_deallocate(buffer->allocator, &buffer->file);
slice_deallocate(buffer->allocator, &buffer->content);
- buffer->allocator = nullptr;
+
+ memset(buffer, 0, sizeof(*buffer));
}
struct Buffer_Manager {