drm/amd/display: Fix memory leak in dcn21_clock_source_create
authorjsg <jsg@openbsd.org>
Mon, 9 May 2022 08:57:21 +0000 (08:57 +0000)
committerjsg <jsg@openbsd.org>
Mon, 9 May 2022 08:57:21 +0000 (08:57 +0000)
From Miaoqian Lin
815b847af99d8b78131174fa1c32da0195c70e4c in linux 5.15.y/5.15.38
65e54987508b6f0771f56bdfa3ee1926d52785ae in mainline linux

sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_resource.c

index eb085a9..971d6a3 100644 (file)
@@ -1430,6 +1430,7 @@ static struct clock_source *dcn21_clock_source_create(
                return &clk_src->base;
        }
 
+       kfree(clk_src);
        BREAK_TO_DEBUGGER();
        return NULL;
 }