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; }