diff --git a/ports/unix/proj/minimal/echo.c b/ports/unix/proj/minimal/echo.c index 11363a6..ef2d065 100644 --- a/ports/unix/proj/minimal/echo.c +++ b/ports/unix/proj/minimal/echo.c @@ -132,7 +132,7 @@ echo_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) es = arg; - if (p == NULL) { + if ((es == NULL) || (p == NULL)) { close_conn(pcb, es); return ERR_OK; }