[Piglit] [PATCH piglit] util: stop overallocating shader memory
Eric Engestrom
eric.engestrom at intel.com
Thu Aug 23 16:50:44 UTC 2018
Fixes: 606e40b2659ad7fc4ae8e "util: Add utilities to handle shader_test files"
Cc: Alejandro PiƱeiro <apinheiro at igalia.com>
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
---
tests/util/piglit-shader-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/piglit-shader-test.c b/tests/util/piglit-shader-test.c
index f11ee8ab5383080ae090..1db6aa2eb203a50ca93e 100644
--- a/tests/util/piglit-shader-test.c
+++ b/tests/util/piglit-shader-test.c
@@ -143,7 +143,7 @@ piglit_load_source_from_shader_test(const char *filename,
text_size = line - first_line + 1;
if (output_source) {
- *output_source = malloc(sizeof(char*) * text_size);
+ *output_source = malloc(sizeof(char) * text_size);
snprintf(*output_source, line - first_line + 1, "%s", first_line);
}
--
Cheers,
Eric
More information about the Piglit
mailing list