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:
parent
7c5d8b3806
commit
83a53449f1
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue