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:
yangsong8
2025-06-16 14:43:20 +08:00
committed by Xiang Xiao
parent cc067ab199
commit d2daf66d38
+6
View File
@@ -1500,6 +1500,12 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver,
#ifdef CONFIG_CDCACM_DISABLE_TXBUF
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
DEBUGASSERT(priv->nwrq == CONFIG_CDCACM_NWRREQS);
#endif