Skip to content

Memory mapping functions can return error without clean up #73121

@lyakh

Description

@lyakh

Describe the bug
If asserts are disabled in a build, both generic and (probably derived from them) hardware-specific memory mapping functions like sys_mm_drv_simple_map_region(), sys_mm_drv_map_region(), sys_mm_drv_simple_map_array() can return in an error case without freeing resources, that they have been able to allocate.

Expected behavior
In failure cases functions should clean up resources, that they've managed to allocate before the failure.

Impact
In error cases can lead to resource exhaustion.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions