mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 16:33:17 +00:00
In read_per_ring_refs(), after 'req' and related memory regions are allocated, xen_blkif_map() is invoked to map the shared frame, irq, and etc. However, if this mapping process fails, no cleanup is performed, leading to memory leaks. To fix this issue, invoke the cleanup before returning the error. Acked-by: Roger Pau Monné <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Wenwen Wang <[email protected]> Signed-off-by: Jens Axboe <[email protected]>