fs/userfs: destroy nxmutex properly
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
f2320a4a69
commit
3727de1a93
@ -1487,6 +1487,7 @@ errout_with_psock:
|
|||||||
psock_close(&priv->psock);
|
psock_close(&priv->psock);
|
||||||
|
|
||||||
errout_with_alloc:
|
errout_with_alloc:
|
||||||
|
nxmutex_destroy(&priv->lock);
|
||||||
kmm_free(priv);
|
kmm_free(priv);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1570,6 +1571,7 @@ static int userfs_unbind(FAR void *handle, FAR struct inode **blkdriver,
|
|||||||
/* Free resources and return success */
|
/* Free resources and return success */
|
||||||
|
|
||||||
psock_close(&priv->psock);
|
psock_close(&priv->psock);
|
||||||
|
nxmutex_destroy(&priv->lock);
|
||||||
kmm_free(priv);
|
kmm_free(priv);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user