]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream-tcp: improve test function cleanup
authorVictor Julien <victor@inliniac.net>
Wed, 13 Apr 2016 08:14:35 +0000 (10:14 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 13 Apr 2016 17:04:29 +0000 (19:04 +0200)
src/stream-tcp-util.c

index 54c500bc93098ac0789c7544bb0848149eafe344..b58db5c2838faeea95d58ca7a45bbf699269908b 100644 (file)
@@ -68,6 +68,7 @@ void StreamTcpUTClearSession(TcpSession *ssn)
 {
     StreamTcpUTClearStream(&ssn->client);
     StreamTcpUTClearStream(&ssn->server);
+    StreamTcpSessionCleanup(ssn);
 }
 
 void StreamTcpUTSetupStream(TcpStream *s, uint32_t isn)
@@ -80,7 +81,7 @@ void StreamTcpUTSetupStream(TcpStream *s, uint32_t isn)
 
 void StreamTcpUTClearStream(TcpStream *s)
 {
-    StreamTcpReturnStreamSegments(s);
+    StreamTcpStreamCleanup(s);
 }
 
 int StreamTcpUTAddSegmentWithPayload(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, TcpStream *stream, uint32_t seq, uint8_t *payload, uint16_t len)