mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-10 21:01:49 +00:00
core: check return value of map.metadata
Even though the call of map.metadata is known to always return a valid pointer (because the meta data is assigned in the code just above), better add an explicit nullptr check.
This commit is contained in:
parent
783c05fd6c
commit
de52cf1cdd
@ -445,10 +445,11 @@ Region_map_component::attach(Dataspace_capability ds_cap, size_t size,
|
||||
error("failed to store attachment info");
|
||||
throw Invalid_dataspace();
|
||||
}
|
||||
Rm_region ®ion = *_map.metadata(attach_at);
|
||||
|
||||
/* inform dataspace about attachment */
|
||||
dsc->attached_to(region);
|
||||
Rm_region * const region_ptr = _map.metadata(attach_at);
|
||||
if (region_ptr)
|
||||
dsc->attached_to(*region_ptr);
|
||||
|
||||
/* check if attach operation resolves any faulting region-manager clients */
|
||||
_faulters.for_each([&] (Rm_faulter &faulter) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user