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
pull/2465/head
Jason Ish 9 years ago committed by Victor Julien
parent 9f6b58747b
commit 27ec811187

@ -671,6 +671,7 @@ static TmEcode PcapLogInitRingBuffer(PcapLogData *pl)
strerror(errno)); strerror(errno));
} }
TAILQ_REMOVE(&pl->pcap_file_list, pf, next); TAILQ_REMOVE(&pl->pcap_file_list, pf, next);
PcapFileNameFree(pf);
pf = TAILQ_FIRST(&pl->pcap_file_list); pf = TAILQ_FIRST(&pl->pcap_file_list);
pl->file_cnt--; pl->file_cnt--;
} }

Loading…
Cancel
Save