diff --git a/ftpd.c b/ftpd.c index f73a0ba..47fc302 100644 --- a/ftpd.c +++ b/ftpd.c @@ -1264,6 +1264,8 @@ static err_t ftpd_msgrecv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t free(text); } pbuf_free(p); + } else if (err == ERR_OK && p != NULL) { + ftpd_msgclose(pcb, fsm); } return ERR_OK;