Reference count must be zero before calling uip_tcpfree()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2065 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-09-16 16:28:53 +00:00
parent 7c5d8b3806
commit 83a53449f1
2 changed files with 2 additions and 0 deletions

View File

@ -196,6 +196,7 @@ int uip_backlogdestroy(FAR struct uip_conn *conn)
blconn->blparent = NULL; blconn->blparent = NULL;
blconn->backlog = NULL; blconn->backlog = NULL;
blconn->crefs = 0;
uip_tcpfree(blconn); uip_tcpfree(blconn);
} }
} }

View File

@ -173,6 +173,7 @@ void uip_tcpinput(struct uip_driver_s *dev)
{ {
/* No, then we have to give the connection back */ /* No, then we have to give the connection back */
conn->crefs = 0;
uip_tcpfree(conn); uip_tcpfree(conn);
conn = NULL; conn = NULL;
} }