SmartFS: Fix a 32-byte memory leak
This commit is contained in:
parent
6be72272eb
commit
b616918e0f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user