Fixed bug that didn't free ftpd ressources on exit
This commit is contained in:
parent
3a98b97ea6
commit
4bf63f12c3
@ -3954,7 +3954,7 @@ static void ftpd_freesession(FAR struct ftpd_session_s *session)
|
|||||||
free(session->user);
|
free(session->user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->fd < 0)
|
if (session->fd > 0)
|
||||||
{
|
{
|
||||||
close(session->fd);
|
close(session->fd);
|
||||||
}
|
}
|
||||||
@ -3971,7 +3971,7 @@ static void ftpd_freesession(FAR struct ftpd_session_s *session)
|
|||||||
free(session->cmd.buffer);
|
free(session->cmd.buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->cmd.sd <0)
|
if (session->cmd.sd > 0)
|
||||||
{
|
{
|
||||||
close(session->cmd.sd);
|
close(session->cmd.sd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user