diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 79266a7..adde81c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -41,6 +41,12 @@ struct buffer *buffer_create(unsigned int size) return b; } +void buffer_destroy(struct buffer *b) +{ + free(b->data); + free(b); +} + int buffer_add(struct buffer *b, void *data, unsigned int size) { if (b->size - b->cur_size < size) { |