mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-15 08:32:44 -05:00
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:
committed by
Alex Deucher
parent
723c1dd362
commit
e60573b598
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user