[PATCH] drm: amd: display: Fix memory leakage
Rodrigo Siqueira Jordao
Rodrigo.Siqueira at amd.com
Thu Jan 12 16:00:50 UTC 2023
On 11/29/22 21:50, Konstantin Meskhidze wrote:
> This commit fixes memory leakage in dc_construct_ctx() function.
>
> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze at huawei.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 997ab031f816..359e28d3567e 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -878,6 +878,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;
> }
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
And applied to amd-staging-drm-next.
Thanks
Siqueira
More information about the amd-gfx
mailing list