[Piglit] [PATCH] arb_tessellation_shader-large-uniforms: Fix memory leaks.
Brian Paul
brianp at vmware.com
Thu Aug 6 06:52:20 PDT 2015
On 08/05/2015 09:22 PM, Vinson Lee wrote:
> Fix resource leak defects reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> tests/spec/arb_tessellation_shader/large-uniforms.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/spec/arb_tessellation_shader/large-uniforms.c b/tests/spec/arb_tessellation_shader/large-uniforms.c
> index c1e6398..a5aea89 100644
> --- a/tests/spec/arb_tessellation_shader/large-uniforms.c
> +++ b/tests/spec/arb_tessellation_shader/large-uniforms.c
> @@ -155,12 +155,14 @@ test_uniform_array(const GLenum shader, const int n, const bool expect_fail)
> fprintf(stderr, "Program with %d uniform components in %s "
> "linked succesfully\n", n,
> piglit_get_gl_enum_name(shader));
> + free(source_uniforms);
> return false;
> }
> if (!link_status && !expect_fail) {
> fprintf(stderr, "Program with %d uniform components in %s "
> "failed to link\n", n,
> piglit_get_gl_enum_name(shader));
> + free(source_uniforms);
> return false;
> }
> glDeleteProgram(prog);
> @@ -227,12 +229,14 @@ test_uniform_block(const GLenum shader, const int num_blocks, const int size,
> fprintf(stderr, "Program with %d uniform blocks of size %d (vec4s)"
> "in %s linked successfully\n", num_blocks, size,
> piglit_get_gl_enum_name(shader));
> + free(source_uniforms);
> return false;
> }
> if (!link_status && !expect_fail) {
> fprintf(stderr, "Program with %d uniform blocks of size %d (vec4s)"
> "in %s failed to link\n", num_blocks, size,
> piglit_get_gl_enum_name(shader));
> + free(source_uniforms);
> return false;
> }
> glDeleteProgram(prog);
>
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list