From: jsg Date: Mon, 27 Mar 2023 03:55:01 +0000 (+0000) Subject: drm: amd: display: Fix memory leakage X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0a3928526ee45641f378c21d01f0e86dfd6ada2f;p=openbsd drm: amd: display: Fix memory leakage From Konstantin Meskhidze 83ace0dd67ee386be1ddcf59dab49d6d9a54e62e in linux-6.1.y/6.1.16 6b8701be1f66064ca72733c5f6e13748cdbf8397 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c index 5260ad6de80..24015f8cac7 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c +++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_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; }