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.1.0-beta1~375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce59ec5d13cda6bebbb706e14789ac1cc4dcc755;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 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);