mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
drivers/usbdev/cdcacm: Fix the issue of missing release one req buf
When unbinding, if a req buf is held by priv->container, it also needs to be released. Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
@@ -1500,6 +1500,12 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver,
|
|||||||
|
|
||||||
#ifdef CONFIG_CDCACM_DISABLE_TXBUF
|
#ifdef CONFIG_CDCACM_DISABLE_TXBUF
|
||||||
DEBUGASSERT(priv->nwrq >= CONFIG_CDCACM_NWRREQS - 1);
|
DEBUGASSERT(priv->nwrq >= CONFIG_CDCACM_NWRREQS - 1);
|
||||||
|
if (priv->wrcontainer)
|
||||||
|
{
|
||||||
|
sq_addlast((FAR sq_entry_t *)priv->wrcontainer, &priv->txfree);
|
||||||
|
priv->wrcontainer = NULL;
|
||||||
|
priv->nwrq++;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
DEBUGASSERT(priv->nwrq == CONFIG_CDCACM_NWRREQS);
|
DEBUGASSERT(priv->nwrq == CONFIG_CDCACM_NWRREQS);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user