src/buffer.c

changeset 991
ec49db06dae0
parent 989
8aa57a7fecc4
--- a/src/buffer.c	Sat Nov 23 15:15:09 2024 +0100
+++ b/src/buffer.c	Tue Nov 26 21:53:06 2024 +0100
@@ -92,9 +92,7 @@
 
 void cxBufferFree(CxBuffer *buffer) {
     if (buffer == NULL) return;
-    if ((buffer->flags & CX_BUFFER_FREE_CONTENTS) == CX_BUFFER_FREE_CONTENTS) {
-        cxFree(buffer->allocator, buffer->bytes);
-    }
+    cxBufferDestroy(buffer);
     cxFree(buffer->allocator, buffer);
 }
 

mercurial