Commit d2f4460a authored by Gong Yuanjun's avatar Gong Yuanjun Committed by Alex Deucher
Browse files

drm/amd/pm: fix a potential gpu_metrics_table memory leak



gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
not freed in yellow_carp_fini_smc_tables().

Signed-off-by: default avatarGong Yuanjun <ruc_gongyuanjun@163.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a2b28708
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -190,6 +190,9 @@ static int yellow_carp_fini_smc_tables(struct smu_context *smu)
	kfree(smu_table->watermarks_table);
	smu_table->watermarks_table = NULL;

	kfree(smu_table->gpu_metrics_table);
	smu_table->gpu_metrics_table = NULL;

	return 0;
}