diff --git a/net/uip/uip_tcpbacklog.c b/net/uip/uip_tcpbacklog.c index 7e2b6ede4e..0abfe3061b 100644 --- a/net/uip/uip_tcpbacklog.c +++ b/net/uip/uip_tcpbacklog.c @@ -196,6 +196,7 @@ int uip_backlogdestroy(FAR struct uip_conn *conn) blconn->blparent = NULL; blconn->backlog = NULL; + blconn->crefs = 0; uip_tcpfree(blconn); } } diff --git a/net/uip/uip_tcpinput.c b/net/uip/uip_tcpinput.c index 5f0430ed26..e09cc62864 100644 --- a/net/uip/uip_tcpinput.c +++ b/net/uip/uip_tcpinput.c @@ -173,6 +173,7 @@ void uip_tcpinput(struct uip_driver_s *dev) { /* No, then we have to give the connection back */ + conn->crefs = 0; uip_tcpfree(conn); conn = NULL; }