[Mesa-dev] [PATCH 3/3] radv/winsys: Fix mem leak at failed do_winsys_init() call site

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 11 11:07:22 UTC 2016


On 11 October 2016 at 10:04, Edward O'Callaghan
<funfunctor at folklore1984.net> wrote:
> Probably unlikely however ensure we don't leak a heap allocation
> on the fail path.
>
> Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
> ---
>  src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
> index 0ce44ac..ded5ed7 100644
> --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
> +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
> @@ -356,5 +356,6 @@ radv_amdgpu_winsys_create(int fd)
>
>         return &ws->base;
>  fail:
There's a missing amdgpu_device_deinitialize() in the error path(s) of
this function.

-Emil


More information about the mesa-dev mailing list