drm: amd: display: Fix memory leakage
[ Upstream commit 6b8701be1f ]
This commit fixes memory leakage in dc_construct_ctx() function.
Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ce9e9d3dcb
commit
d473c55ce1
1 changed files with 1 additions and 0 deletions
|
|
@ -616,6 +616,7 @@ static bool dc_construct_ctx(struct dc *dc,
|
|||
|
||||
dc_ctx->perf_trace = dc_perf_trace_create();
|
||||
if (!dc_ctx->perf_trace) {
|
||||
kfree(dc_ctx);
|
||||
ASSERT_CRITICAL(false);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue