From: Victor Julien Date: Tue, 25 Feb 2014 21:52:18 +0000 (+0100) Subject: ftp: fix memory leak X-Git-Tag: suricata-2.0rc2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F850%2Fhead;p=thirdparty%2Fsuricata.git ftp: fix memory leak db pointers in both directions were not freed. This patch frees them in the state free function. Bug #1090 --- diff --git a/src/app-layer-ftp.c b/src/app-layer-ftp.c index 6fc63b74ea..3e1cf30566 100644 --- a/src/app-layer-ftp.c +++ b/src/app-layer-ftp.c @@ -290,6 +290,10 @@ static void FTPStateFree(void *s) { FtpState *fstate = (FtpState *) s; if (fstate->port_line != NULL) SCFree(fstate->port_line); + if (fstate->line_state[0].db) + SCFree(fstate->line_state[0].db); + if (fstate->line_state[1].db) + SCFree(fstate->line_state[1].db); SCFree(s); #ifdef DEBUG SCMutexLock(&ftp_state_mem_lock);