pcap-log: only allow one instance of pcap-log

As a global is used to store state, only one instance can be used.

See https://redmine.openinfosecfoundation.org/issues/7640.
pull/12968/head
Jason Ish 4 months ago committed by Victor Julien
parent fdc17b2125
commit cddd3a261f

@ -1343,6 +1343,10 @@ static OutputInitResult PcapLogInitCtx(SCConfNode *conf)
int en;
PCRE2_SIZE eo = 0;
if (g_pcap_data) {
FatalError("A pcap-log instance is already active, only one can be enabled.");
}
PcapLogData *pl = SCCalloc(1, sizeof(PcapLogData));
if (unlikely(pl == NULL)) {
FatalError("Failed to allocate Memory for PcapLogData");

Loading…
Cancel
Save