Commit 3148a6a0 authored by Jack Zhang's avatar Jack Zhang Committed by Alex Deucher
Browse files

drm/amdkfd: kfree the wrong pointer



Originally, it kfrees the wrong pointer for mem_obj.
It would cause memory leak under stress test.

Signed-off-by: default avatarJack Zhang <Jack.Zhang1@amd.com>
Acked-by: default avatarNirmoy Das <nirmoy.das@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d6e7042f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1112,9 +1112,9 @@ kfd_gtt_out:
	return 0;

kfd_gtt_no_free_chunk:
	pr_debug("Allocation failed with mem_obj = %p\n", mem_obj);
	pr_debug("Allocation failed with mem_obj = %p\n", *mem_obj);
	mutex_unlock(&kfd->gtt_sa_lock);
	kfree(mem_obj);
	kfree(*mem_obj);
	return -ENOMEM;
}