From f2cdac6ee7a338ace92c6e884f65b9f89841970e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:18:38 +0000 Subject: added output_buffer_free() To do proper cleanup before exiting, we have to provide a destructor for OutputBuffer. One day, valgrind will not complain about memory leaks! git-svn-id: https://svn.musicpd.org/mpd/trunk@7315 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/outputBuffer.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/outputBuffer.c') diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 8e2780eb2..de649e0c7 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -36,6 +36,12 @@ void initOutputBuffer(OutputBuffer * cb, unsigned int size) cb->currentChunk = -1; } +void output_buffer_free(OutputBuffer * cb) +{ + assert(cb->chunks != NULL); + free(cb->chunks); +} + void clearOutputBuffer(OutputBuffer * cb) { cb->end = cb->begin; -- cgit v1.2.3