MINOR: chunk: New function free_trash_buffers()
This new function is meant to be called in the general deinit phase,
to free those two internal chunks.
diff --git a/src/chunk.c b/src/chunk.c
index 3c1cfdf..1359adc 100644
--- a/src/chunk.c
+++ b/src/chunk.c
@@ -66,6 +66,17 @@
}
/*
+ * free the trash buffers
+ */
+void free_trash_buffers(void)
+{
+ free(trash_buf2);
+ free(trash_buf1);
+ trash_buf2 = NULL;
+ trash_buf1 = NULL;
+}
+
+/*
* Does an snprintf() at the beginning of chunk <chk>, respecting the limit of
* at most chk->size chars. If the chk->len is over, nothing is added. Returns
* the new chunk size, or < 0 in case of failure.