From: Jason Ish Date: Mon, 19 Dec 2016 15:11:48 +0000 (-0600) Subject: pcap-log: fix memory leak during initialization of ring buffer X-Git-Tag: suricata-3.2.1~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2465%2Fhead;p=thirdparty%2Fsuricata.git pcap-log: fix memory leak during initialization of ring buffer A free was missing when files are removed during initialization of the ring buffer. Redmine issue: https://redmine.openinfosecfoundation.org/issues/1985 --- diff --git a/src/log-pcap.c b/src/log-pcap.c index cc309e318a..70f4c6bf91 100644 --- a/src/log-pcap.c +++ b/src/log-pcap.c @@ -671,6 +671,7 @@ static TmEcode PcapLogInitRingBuffer(PcapLogData *pl) strerror(errno)); } TAILQ_REMOVE(&pl->pcap_file_list, pf, next); + PcapFileNameFree(pf); pf = TAILQ_FIRST(&pl->pcap_file_list); pl->file_cnt--; }