Commit e60573b5 authored by Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer Committed by Alex Deucher
Browse files

drm/amdgpu: free job fences on failure in amdgpu_job_alloc_with_ib



Otherwise we're leaking memory.

Fixes: db36632e ("drm/amdgpu: clean up and unify hw fence handling")
Signed-off-by: default avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 723c1dd3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}