fs/romfs: One allocation was not being freed if there was a subsequent failure to allocation I/O buffers resulting in a memory leak on certain error conditions. From Bruno Herrera.
This commit is contained in:
parent
3fd07e32e9
commit
915792cca1
@ -10905,4 +10905,6 @@
|
||||
to protect and unprotect memory (2015-08-29).
|
||||
* binfmt/builtin.c: Fix a memory leak: File was not being closed.
|
||||
From Bruno Herrera (2015-08-30).
|
||||
|
||||
* fs/romfs: One allocation was not being freed if there was a
|
||||
subsequent failure to allocation I/O buffers resulting in a memory
|
||||
leak on certain error conditions. From Bruno Herrera (2015-08-30).
|
||||
|
@ -656,6 +656,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
ret = romfs_fileconfigure(rm, newrf);
|
||||
if (ret < 0)
|
||||
{
|
||||
kmm_free(newrf);
|
||||
fdbg("Failed configure buffering: %d\n", ret);
|
||||
goto errout_with_semaphore;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user