[Piglit] [PATCH] shader_runner: Fix memory leak.

Brian Paul brianp at vmware.com
Fri Dec 14 06:01:56 PST 2012


On 12/14/2012 12:11 AM, Vinson Lee wrote:
> Fixes resource leak defect reported by Coverity.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   tests/shaders/shader_runner.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index 7612dd7..db92b8f 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -911,6 +911,8 @@ parse_required_versions(struct requirement_parse_results *results,
>   			line++;
>   	}
>
> +	free(text);
> +
>   	if (results->found_glsl&&  results->glsl_version.es&&  !results->found_gl) {
>   		printf("%s", "The test specifies a requirement for GLSL ES, "
>   		       "but specifies no GL requirement\n.");

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list