mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
if first call unlink after call nxmq_file_close cause i_crefs not 0 will leak msqg, inode will free in unlink, but forget free msgq Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ static int nxmq_file_close(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
|
||||
if (atomic_read(&inode->i_crefs) <= 0)
|
||||
if (atomic_read(&inode->i_crefs) <= 1)
|
||||
{
|
||||
FAR struct mqueue_inode_s *msgq = inode->i_private;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user