From 9b4f3f918b85a2bc9e67fcaea57fa8760680735d Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 25 Jan 2010 00:01:04 +0100 Subject: [PATCH] Fix broken debug code in stream reassembly --- src/stream-tcp-reassemble.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 9476f56dd2..89c58da4d5 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -88,8 +88,6 @@ void TcpSegmentPoolFree(void *ptr) { return; TcpSegment *seg = (TcpSegment *) ptr; - free(seg->payload); - free(seg); #ifdef DEBUG SCMutexLock(&segment_pool_memuse_mutex); @@ -98,6 +96,9 @@ void TcpSegmentPoolFree(void *ptr) { SCLogDebug("segment_pool_memcnt %"PRIu64"", segment_pool_memcnt); SCMutexUnlock(&segment_pool_memuse_mutex); #endif + + free(seg->payload); + free(seg); return; }