mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 09:45:55 +08:00
SmartFS: Fix a 32-byte memory leak
This commit is contained in:
@@ -1691,6 +1691,11 @@ static int smartfs_unlink(struct inode *mountpt, const char *relpath)
|
||||
ret = OK;
|
||||
|
||||
errout_with_semaphore:
|
||||
if (entry.name != NULL)
|
||||
{
|
||||
kmm_free(entry.name);
|
||||
}
|
||||
|
||||
smartfs_semgive(fs);
|
||||
return ret;
|
||||
}
|
||||
@@ -1856,6 +1861,11 @@ int smartfs_rmdir(struct inode *mountpt, const char *relpath)
|
||||
ret = OK;
|
||||
|
||||
errout_with_semaphore:
|
||||
if (entry.name != NULL)
|
||||
{
|
||||
kmm_free(entry.name);
|
||||
}
|
||||
|
||||
smartfs_semgive(fs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user