[Piglit] [PATCH] arb_shader_atomic_counters-unique-id: Fix memory leak.

Brian Paul brianp at vmware.com
Thu Aug 7 05:22:37 PDT 2014


On 08/06/2014 06:47 PM, Vinson Lee wrote:
> Fixes Coverity "Resource leak" defect.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>   tests/spec/arb_shader_atomic_counters/unique-id.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/spec/arb_shader_atomic_counters/unique-id.c b/tests/spec/arb_shader_atomic_counters/unique-id.c
> index 55b12e4..eee4f2c 100644
> --- a/tests/spec/arb_shader_atomic_counters/unique-id.c
> +++ b/tests/spec/arb_shader_atomic_counters/unique-id.c
> @@ -63,6 +63,7 @@ check(int dx, int dy, uint32_t start_value, uint32_t end_value)
>                                   printf("Probe value at (%d, %d)\n", x, y);
>                                   printf("  Observed: 0x%08x\n", v);
>                                   printf("  Value outside expected window.\n");
> +                                free(frequency);
>                                   return false;
>                           }
>
> @@ -70,6 +71,7 @@ check(int dx, int dy, uint32_t start_value, uint32_t end_value)
>                                   printf("Probe value at (%d, %d)\n", x, y);
>                                   printf("  Observed: 0x%08x\n", v);
>                                   printf("  Value not unique.\n");
> +                                free(frequency);
>                                   return false;
>                           }
>                   }
>

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



More information about the Piglit mailing list