diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-17 17:12:49 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-17 17:12:49 +0000 |
commit | ab4f7c0abd2d42f20b8675b3bc552a88204ce4ad (patch) | |
tree | 97f40ed93139f6552f890aab570cabc65004c7ae /src | |
parent | a156e55302d7ce35234b6075124d2b5ed4037c89 (diff) | |
download | conntrack-tools-ab4f7c0abd2d42f20b8675b3bc552a88204ce4ad.tar.gz conntrack-tools-ab4f7c0abd2d42f20b8675b3bc552a88204ce4ad.zip |
Max Kellermann <max@duempel.org>:
add buffer_destroy() to buffer.c
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) { |