summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-08-14 16:33:42 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-08-14 16:33:42 +0200
commit2c5bed23c8afdd7f349d861fb7e7c8ba33ae3fe1 (patch)
tree19793d8f5aa557493d5ded965294d5a51db86d8c
parent817f847b52bb05c924491deb994194fd5c1c3ba2 (diff)
conntrackd: fix crash for unubuffered channel on exit path
This patch fixes a crash in the exit path for channels that are not buffered (no CHANNEL_F_BUFFERED flag set). This fix does not affect any existing channel in the tree. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index 255026a..9d74b7f 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -57,6 +57,9 @@ channel_buffer_open(int mtu)
static void
channel_buffer_close(struct channel_buffer *b)
{
+ if (b == NULL)
+ return;
+
free(b->data);
free(b);
}