From: Eric Leblond Date: Fri, 4 Mar 2016 12:47:50 +0000 (+0100) Subject: output-filedata: fix memleak X-Git-Tag: suricata-3.0.1RC1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2866f87c6d4569b474ec0eb2a6d2a728782f3f4d;p=thirdparty%2Fsuricata.git output-filedata: fix memleak This fixes: Direct leak of 31792 byte(s) in 3974 object(s) allocated from: #0 0x4c396b in malloc (/opt/suricata-asan/bin/suricata+0x4c396b) #1 0xd86ce2 in OutputFiledataLogThreadInit /home/pmanev/sandnet-qa/stage/oisf/src/output-filedata.c:308:34 #2 0x106c255 in TmThreadsSlotPktAcqLoop /home/pmanev/sandnet-qa/stage/oisf/src/tm-threads.c:295:17 #3 0x7fbc9fcb3181 in start_thread /build/eglibc-3GlaMS/eglibc-2.19/nptl/pthread_create.c:312 --- diff --git a/src/output-filedata.c b/src/output-filedata.c index 8f466bafc6..9818339dfc 100644 --- a/src/output-filedata.c +++ b/src/output-filedata.c @@ -434,6 +434,8 @@ static TmEcode OutputFiledataLogThreadDeinit(ThreadVars *tv, void *thread_data) g_waldo_deinit = 1; } SCMutexUnlock(&g_waldo_mutex); + + SCFree(op_thread_data); return TM_ECODE_OK; }