Commit 22bd5f69 authored by Bhuvanachandra Pinninti's avatar Bhuvanachandra Pinninti Committed by Alex Deucher
Browse files

drm/amd/display: DIO memory leak fix.



[why]
Allocated memory for dcn10_dio but not freed in dcn401_resource.

[how]
Add kfree for it in dcn401_resource.

Reviewed-by: default avatarAric Cyr <aric.cyr@amd.com>
Signed-off-by: default avatarBhuvanachandra Pinninti <bpinnint@amd.com>
Signed-off-by: default avatarWayne Lin <wayne.lin@amd.com>
Tested-by: default avatarDan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1e5a335e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;