fs: unlock tmpfs before free the file object

tcb will hold an invalid semaphore when CONFIG_PRIORITY_INHERITANCE is enabled

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-01-19 21:13:17 +08:00 committed by Xiang Xiao
parent 7e80879f88
commit 8c52633bd0

View file

@ -1444,6 +1444,7 @@ static int tmpfs_close(FAR struct file *filep)
* have any other references.
*/
nxrmutex_destroy(&tfo->tfo_lock);
kmm_free(tfo->tfo_data);
kmm_free(tfo);
return OK;