summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce112
diff options
context:
space:
mode:
authorNavid Emamdoost <navid.emamdoost@gmail.com>2019-09-24 23:23:56 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-09-25 14:58:38 -0500
commit104c307147ad379617472dd91a5bcb368d72bd6d (patch)
tree0118ac33bb90ed225085a6c5b4d3f79732e9dcd8 /drivers/gpu/drm/amd/display/dc/dce112
parent1e94b43813a2757f6ee471584ca07cdbc1a51db9 (diff)
drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce112')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
index 2b3a2917c168..83e1878161c9 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -1342,6 +1342,7 @@ struct resource_pool *dce112_create_resource_pool(
if (construct(num_virtual_links, dc, pool))
return &pool->base;
+ kfree(pool);
BREAK_TO_DEBUGGER();
return NULL;
}