mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
drm/ttm: fix memory leak noticed by kmemleak.
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>
This commit is contained in:
parent
b16d9acbdb
commit
ec42a6e7dc
@ -323,8 +323,10 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob,
|
|||||||
* No special dma32 zone needed.
|
* No special dma32 zone needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (mem <= ((uint64_t) 1ULL << 32))
|
if (mem <= ((uint64_t) 1ULL << 32)) {
|
||||||
|
kfree(zone);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Limit max dma32 memory to 4GB for now
|
* Limit max dma32 memory to 4GB for now
|
||||||
|
Loading…
x
Reference in New Issue
Block a user