drivers/input:fix circbuf leak

Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
This commit is contained in:
liuhongchao 2023-08-14 11:25:02 +08:00 committed by Xiang Xiao
parent 5830da2fc8
commit f9dbeaef86
1 changed files with 1 additions and 0 deletions

View File

@ -139,6 +139,7 @@ static int keyboard_open(FAR struct file *filep)
ret = upper->lower->open(upper->lower);
if (ret < 0)
{
circbuf_uninit(&opriv->circ);
kmm_free(opriv);
nxmutex_unlock(&upper->lock);
return ret;