drm/amdgpu: free job fences on failure in amdgpu_job_alloc_with_ib

Otherwise we're leaking memory.

Fixes: db36632ea5 ("drm/amdgpu: clean up and unify hw fence handling")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2025-11-24 15:42:50 +01:00
committed by Alex Deucher
parent 723c1dd362
commit e60573b598

View File

@@ -246,6 +246,8 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev,
if (r) {
if (entity)
drm_sched_job_cleanup(&(*job)->base);
kfree((*job)->hw_vm_fence);
kfree((*job)->hw_fence);
kfree(*job);
*job = NULL;
}