ftp: fix memory leak

db pointers in both directions were not freed. This patch frees them
in the state free function.

Bug #1090
pull/850/head
Victor Julien 11 years ago
parent d63df6937c
commit b4ab9a0a3c

@ -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);

Loading…
Cancel
Save