From 00111499b07c56eb876586fdf29b2b5440be8b39 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 23 Oct 2018 13:01:53 +0200 Subject: [PATCH] log-pcap: fix coverity memleak warning --- src/log-pcap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/log-pcap.c b/src/log-pcap.c index 91cf8a3e24..a31e786939 100644 --- a/src/log-pcap.c +++ b/src/log-pcap.c @@ -1401,14 +1401,14 @@ static OutputInitResult PcapLogInitCtx(ConfNode *conf) SCLogError(SC_ERR_INVALID_ARGUMENT, "lz4 compression was selected " "in pcap-log, but suricata was not compiled with lz4 " "support."); + PcapLogDataFree(pl); return result; #endif /* HAVE_LIBLZ4 */ } else { SCLogError(SC_ERR_INVALID_ARGUMENT, "Unsupported pcap-log " "compression format: %s", compression_str); - SCFree(pl->h); - SCFree(pl); + PcapLogDataFree(pl); return result; }