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 <vlee@freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6510>
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index 79e5d8d..6d5478e 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 @@
ibs = malloc(number_of_ibs * sizeof(*ibs));
if (!ibs) {
- free(request.handles);
+ free(handles);
return VK_ERROR_OUT_OF_HOST_MEMORY;
}