Skip to content

Commit 75818af

Browse files
BoardzMasteralexdeucher
authored andcommitted
drm/amdkfd: Fix memory leakage
This patch fixes potential memory leakage and seg fault in _gpuvm_import_dmabuf() function Fixes: d4ec4bd ("drm/amdkfd: Allow access for mmapping KFD BOs") Signed-off-by: Konstantin Meskhidze <[email protected]> Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3d271e2 commit 75818af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ int amdgpu_amdkfd_gpuvm_import_dmabuf(struct amdgpu_device *adev,
22042204

22052205
ret = drm_vma_node_allow(&obj->vma_node, drm_priv);
22062206
if (ret) {
2207-
kfree(mem);
2207+
kfree(*mem);
22082208
return ret;
22092209
}
22102210

0 commit comments

Comments
 (0)