mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
fs: pseudorename should call inode_release in the error path
to avoid the memory leak Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I8f7e4c8fb89188614d03dcf383a1707f25c65174
This commit is contained in:
@@ -88,6 +88,7 @@ next_subdir:
|
||||
|
||||
if (oldinode == newinode)
|
||||
{
|
||||
inode_release(newinode);
|
||||
ret = OK;
|
||||
goto errout; /* Bad naming, this is not an error case. */
|
||||
}
|
||||
@@ -130,6 +131,7 @@ next_subdir:
|
||||
|
||||
if (subdir == NULL)
|
||||
{
|
||||
inode_release(newinode);
|
||||
ret = -ENOMEM;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user