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 485ea7d711 ("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>
This commit is contained in:
Vinson Lee 2020-08-30 17:52:32 -07:00
parent b778e7bd6c
commit 50e14c3d25
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}