[Piglit] [PATCH piglit] util: stop overallocating shader memory
Alejandro Piñeiro
apinheiro at igalia.com
Fri Aug 24 08:20:34 UTC 2018
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
On 23/08/18 18:50, Eric Engestrom wrote:
> 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);
> }
>
More information about the Piglit
mailing list