diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-24 23:23:56 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-03 09:11:03 -0500 |
commit | e7883ab63213e3eea001af522ca5f4fc91075572 (patch) | |
tree | f9f274b473e319ae28362157077336c816044ea8 /drivers/gpu/drm/amd/display/dc/dce120 | |
parent | b77fb9d88e62bbe85cd52b4ef18e74ea65551773 (diff) | |
download | linux-e7883ab63213e3eea001af522ca5f4fc91075572.tar.bz2 |
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/dce120')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c index 236c4c0324b1..8b85e5274bba 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c @@ -1208,6 +1208,7 @@ struct resource_pool *dce120_create_resource_pool( if (construct(num_virtual_links, dc, pool)) return &pool->base; + kfree(pool); BREAK_TO_DEBUGGER(); return NULL; } |