提交 6b8701be 编写于 作者: K Konstantin Meskhidze 提交者: Alex Deucher

drm: amd: display: Fix memory leakage

This commit fixes memory leakage in dc_construct_ctx() function.
Signed-off-by: NKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 2ab21bb9
...@@ -871,6 +871,7 @@ static bool dc_construct_ctx(struct dc *dc, ...@@ -871,6 +871,7 @@ static bool dc_construct_ctx(struct dc *dc,
dc_ctx->perf_trace = dc_perf_trace_create(); dc_ctx->perf_trace = dc_perf_trace_create();
if (!dc_ctx->perf_trace) { if (!dc_ctx->perf_trace) {
kfree(dc_ctx);
ASSERT_CRITICAL(false); ASSERT_CRITICAL(false);
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册