Commit a5467ebd authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Alex Deucher
Browse files

drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'



'watermarks_table' must be freed instead 'clocks_table', because
'clocks_table' is known to be NULL at this point and 'watermarks_table' is
never freed if the last kzalloc fails.

Fixes: c98ee897 ("drm/amd/pm: add the fine grain tuning function for vangogh")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b5768a78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ static int vangogh_tables_init(struct smu_context *smu)
	return 0;

err3_out:
	kfree(smu_table->clocks_table);
	kfree(smu_table->watermarks_table);
err2_out:
	kfree(smu_table->gpu_metrics_table);
err1_out: