Re: drm/amdgpu/userq: fix memory leak in MQD creation error paths
From: Markus Elfring
Date: Sun Mar 15 2026 - 05:51:23 EST
> A full conversion to scope-based cleanup would require restructuring
> the entire function, which seems beyond the scope of a bug fix.
If you would like to stick to the usage of goto labels so far,
I see further possibilities to avoid also duplicate source code for
the affected implementation of the function “mes_userq_mqd_create”.
https://elixir.bootlin.com/linux/v7.0-rc3/source/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c#L275-L434
Regards,
Markus