From: Victor Julien Date: Tue, 23 Feb 2016 10:59:00 +0000 (+0100) Subject: bpf: fix memleak on unusual error (CID 1197757) X-Git-Tag: suricata-3.0.1RC1~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=893b01ed0de9c7da81685d54f9fa2c7cfc22730f;p=thirdparty%2Fsuricata.git bpf: fix memleak on unusual error (CID 1197757) --- diff --git a/src/suricata.c b/src/suricata.c index 811a760008..f8680a9240 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -433,6 +433,7 @@ static int SetBpfString(int optind, char *argv[]) if(strlen(bpf_filter) > 0) { if (ConfSetFinal("bpf-filter", bpf_filter) != 1) { SCLogError(SC_ERR_FATAL, "Failed to set bpf filter."); + SCFree(bpf_filter); return TM_ECODE_FAILED; } }