]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: DIO memory leak fix.
authorBhuvanachandra Pinninti <bpinnint@amd.com>
Fri, 23 Jan 2026 10:43:01 +0000 (16:13 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 3 Feb 2026 21:43:32 +0000 (16:43 -0500)
[why]
Allocated memory for dcn10_dio but not freed in dcn401_resource.

[how]
Add kfree for it in dcn401_resource.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Bhuvanachandra Pinninti <bpinnint@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c

index df3acf58958281e9df9f78bf6483e205a6cf49a9..4875faffe8735f171b119fd7054a17662bea78e5 100644 (file)
@@ -1532,6 +1532,11 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool)
        if (pool->base.dccg != NULL)
                dcn_dccg_destroy(&pool->base.dccg);
 
+       if (pool->base.dio != NULL) {
+               kfree(TO_DCN10_DIO(pool->base.dio));
+               pool->base.dio = NULL;
+       }
+
        if (pool->base.oem_device != NULL) {
                struct dc *dc = pool->base.oem_device->ctx->dc;