projects
/
platform
/
kernel
/
linux-3.10.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
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_memory.c
b/drivers/gpu/drm/ttm/ttm_memory.c
index
8bfde5f
..
f5245c0
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