fs/userfs: destroy nxmutex properly

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2022-11-20 21:36:28 +08:00 committed by Xiang Xiao
parent f2320a4a69
commit 3727de1a93

View File

@ -1487,6 +1487,7 @@ errout_with_psock:
psock_close(&priv->psock);
errout_with_alloc:
nxmutex_destroy(&priv->lock);
kmm_free(priv);
return ret;
}
@ -1570,6 +1571,7 @@ static int userfs_unbind(FAR void *handle, FAR struct inode **blkdriver,
/* Free resources and return success */
psock_close(&priv->psock);
nxmutex_destroy(&priv->lock);
kmm_free(priv);
return OK;
}