netutils/ftpd: fix hardfault when initial socket, bind or listen fails
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
parent
6aca60133c
commit
5c8d6934a5
@ -4496,7 +4496,10 @@ void ftpd_close(FTPD_SESSION handle)
|
|||||||
DEBUGASSERT(handle);
|
DEBUGASSERT(handle);
|
||||||
|
|
||||||
server = (struct ftpd_server_s *)handle;
|
server = (struct ftpd_server_s *)handle;
|
||||||
ftpd_account_free(server->head);
|
if (server->head != NULL)
|
||||||
|
{
|
||||||
|
ftpd_account_free(server->head);
|
||||||
|
}
|
||||||
|
|
||||||
if (server->sd >= 0)
|
if (server->sd >= 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user