From: Eric Leblond Date: Mon, 1 Jan 2018 18:03:24 +0000 (+0100) Subject: af-packet: free ring buffer at exit X-Git-Tag: suricata-4.0.4~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbd925cd236d711d52116ee368e8a6c78f6cf3c9;p=thirdparty%2Fsuricata.git af-packet: free ring buffer at exit --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 3c1d000eb7..02e9b0b0d2 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -2276,6 +2276,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);