From ce59ec5d13cda6bebbb706e14789ac1cc4dcc755 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Mon, 1 Jan 2018 19:03:24 +0100 Subject: [PATCH] af-packet: free ring buffer at exit --- src/source-af-packet.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 11a872ae4f..be8530f9a5 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -2264,6 +2264,12 @@ TmEcode ReceiveAFPThreadDeinit(ThreadVars *tv, void *data) ptv->datalen = 0; ptv->bpf_filter = NULL; + if ((ptv->flags & AFP_TPACKET_V3) && ptv->ring_v3) { + SCFree(ptv->ring_v3); + } else { + if (ptv->ring_v2) + SCFree(ptv->ring_v2); + } SCFree(ptv); SCReturnInt(TM_ECODE_OK); -- 2.47.2