]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output-packet: fix memleak
authorEric Leblond <eric@regit.org>
Fri, 4 Mar 2016 12:43:07 +0000 (13:43 +0100)
committerEric Leblond <eric@regit.org>
Mon, 7 Mar 2016 22:12:07 +0000 (23:12 +0100)
This fixes:

Direct leak of 31832 byte(s) in 3979 object(s) allocated from:
    #0 0x4c396b in malloc (/opt/suricata-asan/bin/suricata+0x4c396b)
    #1 0xe22129 in OutputPacketLogThreadInit /home/pmanev/sandnet-qa/stage/oisf/src/output-packet.c:123: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

src/output-packet.c

index d2cd901c88bb53c004f8d00cb5475c1df16057e8..7e2b550b115771fecf81a8dbf7f125495c3a03db 100644 (file)
@@ -191,6 +191,8 @@ static TmEcode OutputPacketLogThreadDeinit(ThreadVars *tv, void *thread_data)
 
         logger = logger->next;
     }
+
+    SCFree(op_thread_data);
     return TM_ECODE_OK;
 }