In the Linux kernel, the following vulnerability has been resolved:
iommu/vt-d: Fix potential memory leak in intelsetupirq_remapping()
After commit e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated"). For tear down scenario, fn is only freed after fail to allocate irdomain, though it also should be freed in case dmarenable_qi returns error.
Besides free fn, irqdomain and irmsidomain need to be removed as well if intelsetupirqremapping fails to enable queued invalidation.
Improve the rewinding path by add outfreeirdomain and outfree_fwnode lables per Baolu's suggestion.