fs_msync:Fix crash caused under the anonymous mapping
Summary: Limitations of using fs putfile Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
d04205aa3d
commit
c9148fbb0a
@ -286,7 +286,11 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags,
|
||||
|
||||
ret = file_mmap_(filep, start, length,
|
||||
prot, flags, offset, MAP_USER, &mapped);
|
||||
fs_putfilep(filep);
|
||||
if (filep)
|
||||
{
|
||||
fs_putfilep(filep);
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
goto errout;
|
||||
|
Loading…
Reference in New Issue
Block a user