HomeFreeBSD

arm64/iommu: Fix a resource leak in smmu_domain_alloc()

Description

arm64/iommu: Fix a resource leak in smmu_domain_alloc()

We should free the allocated ASID if smmu_init_cd() fails.

Move the allocation of "domain" to simplify the first error path.

Reported by: Kevin Day <kevin@your.org>
Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54676

Details

Provenance
markjAuthored on Jan 15 2026, 2:04 PM
Reviewer
br
Differential Revision
D54676: arm64/iommu: Fix a resource leak in smmu_domain_alloc()
Parents
rG6fef0c9ee64c: arm64/vgic_v3: Fix an inverted test when reading GICD_I<C|S>ENABLER
Branches
Unknown
Tags
Unknown