mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-21 07:00:08 -05:00
mem: Improve search for existing mapping
When we search for an exaisting mapping, anything that contains the offset+size range is ok, not just the larger mmapped area. This fixes a leak where the imported block mapping was not used and leaked.
This commit is contained in:
parent
34dada9c4c
commit
4796673581
1 changed files with 1 additions and 1 deletions
|
|
@ -349,7 +349,7 @@ struct pw_memmap * pw_memblock_map(struct pw_memblock *block,
|
|||
|
||||
pw_map_range_init(&range, offset, size, p->pagesize);
|
||||
|
||||
m = memblock_find_mapping(b, flags, range.offset, range.size);
|
||||
m = memblock_find_mapping(b, flags, offset, size);
|
||||
if (m == NULL)
|
||||
m = memblock_map(b, flags, range.offset, range.size);
|
||||
if (m == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue