fs/unionfs: fix bug about use after free about ui
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
4e581f76f1
commit
4631face24
@ -1001,12 +1001,15 @@ static int unionfs_close(FAR struct file *filep)
|
||||
{
|
||||
unionfs_destroy(ui);
|
||||
}
|
||||
else
|
||||
{
|
||||
unionfs_semgive(ui);
|
||||
}
|
||||
|
||||
/* Free the open file container */
|
||||
|
||||
kmm_free(uf);
|
||||
filep->f_priv = NULL;
|
||||
unionfs_semgive(ui);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user