[igt-dev] [i-g-t V2 4/8] Revert "tests/kms_color: Fix memory leaks"

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Sep 22 05:11:38 UTC 2022


This reverts commit cd21565a5fffc451e2cae5f1a0fe20104dc2a2cf.
---
 tests/kms_color.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index 6ea721f1..0b03fb9a 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -397,13 +397,8 @@ static bool test_pipe_legacy_gamma_reset(data_t *data,
 	drmModeFreeCrtc(kms_crtc);
 
 	red_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
-	igt_assert(red_lut);
-
 	green_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
-	igt_assert(green_lut);
-
 	blue_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
-	igt_assert(blue_lut);
 
 	for (i = 0; i < legacy_lut_size; i++)
 		red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
@@ -432,17 +427,13 @@ static bool test_pipe_legacy_gamma_reset(data_t *data,
 			   lut[i].blue == 0xffff);
 	drmModeFreePropertyBlob(blob);
 
-	free(red_lut);
-	free(green_lut);
-	free(blue_lut);
-
-end:
 	igt_plane_set_fb(primary, NULL);
 	igt_output_set_pipe(output, PIPE_NONE);
 	igt_display_commit(&data->display);
 
 	free_lut(degamma_linear);
 	free_lut(gamma_zero);
+end:
 	return ret;
 }
 
-- 
2.37.3



More information about the igt-dev mailing list