From: Eric Leblond Date: Fri, 4 Mar 2016 18:33:25 +0000 (+0100) Subject: tmqh-flow: fix memleak in TmqhFlowCtx cleaning X-Git-Tag: suricata-3.0.1RC1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2e2174942d562bcf86777576b821381c3ef3bc7;p=thirdparty%2Fsuricata.git tmqh-flow: fix memleak in TmqhFlowCtx cleaning This fixes: 96 bytes in 4 blocks are definitely lost in loss record 178 of 320 at 0x4C29C0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x8FF88C: TmqhOutputFlowSetupCtx (tmqh-flow.c:163) by 0x908D5F: TmThreadCreate (tm-threads.c:1097) by 0x909A62: TmThreadCreatePacketHandler (tm-threads.c:1156) by 0x8790CF: RunModeFilePcapAutoFp (runmode-pcap-file.c:188) by 0x8837CB: RunModeDispatch (runmodes.c:372) by 0x87F2A5: UnixSocketPcapFilesCheck (runmode-unix-socket.c:393) by 0x910460: UnixCommandBackgroundTasks (unix-manager.c:430) by 0x91420D: UnixManager (unix-manager.c:980) by 0x907853: TmThreadsManagement (tm-threads.c:602) by 0x68DE283: start_thread (pthread_create.c:333) by 0x80A6A4C: clone (in /lib/x86_64-linux-gnu/libc-2.21.so) --- diff --git a/src/tmqh-flow.c b/src/tmqh-flow.c index 6ea8917bdb..a1ec839bcf 100644 --- a/src/tmqh-flow.c +++ b/src/tmqh-flow.c @@ -217,6 +217,7 @@ void TmqhOutputFlowFreeCtx(void *ctx) } SCFree(fctx->queues); + SCFree(fctx); return; }