From: Vinson Lee Date: Mon, 31 Aug 2020 00:52:32 +0000 (-0700) Subject: radv/winsys: Fix memory leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50e14c3d258f5be887b4101cc3b01bb16ad50caa;p=mesa.git radv/winsys: Fix memory leak. Fix warning reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable handles going out of scope leaks the storage it points to. Fixes 485ea7d711fc ("radv/winsys: pass the buffer list via the CS ioctl for less CPU overhead") Signed-off-by: Vinson Lee Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index 79e5d8daa6d..6d5478e9d2a 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -999,7 +999,7 @@ radv_amdgpu_winsys_cs_submit_fallback(struct radeon_winsys_ctx *_ctx, ibs = malloc(number_of_ibs * sizeof(*ibs)); if (!ibs) { - free(request.handles); + free(handles); return VK_ERROR_OUT_OF_HOST_MEMORY; }