drm/amdgpu: fix memory leak
authorNirmoy Das <nirmoy.das@amd.com>
Fri, 4 Oct 2019 09:53:37 +0000 (11:53 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Oct 2019 16:45:59 +0000 (11:45 -0500)
commit083164dbdb17c5ea4ad92c1782b59c9d75567790
tree8c122489f8d012b0525b7fbb89f42dffcea59593
parentda0c9ea146cbe92b832f1b0f694840ea8eb33cce
drm/amdgpu: fix memory leak

cleanup error handling code and make sure temporary info array
with the handles are freed by amdgpu_bo_list_put() on
idr_replace()'s failure.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c