iommu/amd: Fix possible memory leak of 'domain'
Move allocation code down to avoid memory leak. Fixes: 29f54745 ("iommu/amd: Add missing domain type checks") Signed-off-by: Su Hui <suhui@nfschina.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20230608021933.856045-1-suhui@nfschina.comSigned-off-by: Joerg Roedel <jroedel@suse.de>
Showing
Please register or sign in to comment