Fixed bug that didn't free ftpd ressources on exit

This commit is contained in:
Pascal Speck 2016-11-21 17:08:55 +01:00
parent 3a98b97ea6
commit 4bf63f12c3

View File

@ -3954,7 +3954,7 @@ static void ftpd_freesession(FAR struct ftpd_session_s *session)
free(session->user);
}
if (session->fd < 0)
if (session->fd > 0)
{
close(session->fd);
}
@ -3971,7 +3971,7 @@ static void ftpd_freesession(FAR struct ftpd_session_s *session)
free(session->cmd.buffer);
}
if (session->cmd.sd <0)
if (session->cmd.sd > 0)
{
close(session->cmd.sd);
}