From 2c5bed23c8afdd7f349d861fb7e7c8ba33ae3fe1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 14 Aug 2009 16:33:42 +0200 Subject: 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 --- src/channel.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- cgit v1.2.3