projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
028423b
)
drm/amdgpu: fix memory leak in amdgpu_vm_update_page_directory
author
Sudip Mukherjee
<
[email protected]
>
Thu, 8 Oct 2015 13:58:01 +0000
(19:28 +0530)
committer
Alex Deucher
<
[email protected]
>
Thu, 8 Oct 2015 16:18:23 +0000
(12:18 -0400)
If amdgpu_ib_get() fails we returned the error code but we missed
freeing ib.
Cc: "Christian König" <
[email protected]
>
Cc: Jammy Zhou <
[email protected]
>
Cc: Chunming Zhou <
[email protected]
>
Cc: Alex Deucher <
[email protected]
>
Cc: "monk.liu" <
[email protected]
>
Signed-off-by: Sudip Mukherjee <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
Cc:
[email protected]
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 1e14531353e05ec7aadd69ea9d6e019310a25682..53d551f2d8395ccc24dc799887160e0977419ef2 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@
-455,8
+455,10
@@
int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,
return -ENOMEM;
r = amdgpu_ib_get(ring, NULL, ndw * 4, ib);
- if (r)
+ if (r) {
+ kfree(ib);
return r;
+ }
ib->length_dw = 0;
/* walk over the address space and update the page directory */