projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b16d9ac
)
drm/ttm: fix memory leak noticed by kmemleak.
author
Dave Airlie
<airlied@redhat.com>
Tue, 8 Dec 2009 05:58:08 +0000
(15:58 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Wed, 9 Dec 2009 03:29:37 +0000
(13:29 +1000)
If we don't need the zone we need to free it.
Acked-By: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_memory.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_memory.c
b/drivers/gpu/drm/ttm/ttm_memory.c
index 8bfde5f4084191ded1b3e3bb769b7fbdf0eb2a27..f5245c02b8fd0b927f6d38db3bd997e57e1e3e98 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_memory.c
+++ b/
drivers/gpu/drm/ttm/ttm_memory.c
@@
-323,8
+323,10
@@
static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob,
* No special dma32 zone needed.
*/
- if (mem <= ((uint64_t) 1ULL << 32))
+ if (mem <= ((uint64_t) 1ULL << 32)) {
+ kfree(zone);
return 0;
+ }
/*
* Limit max dma32 memory to 4GB for now