[Piglit] [PATCH] CL: Fix memory leak in parse_name
Tom Stellard
tom at stellard.net
Mon Nov 11 15:31:39 PST 2013
On Mon, Nov 11, 2013 at 08:43:56AM -0600, Aaron Watry wrote:
> We need to free a regex after compiling/executing it.
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> ---
> tests/cl/program/program-tester.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c
> index be6bc20..31aeec9 100644
> --- a/tests/cl/program/program-tester.c
> +++ b/tests/cl/program/program-tester.c
> @@ -1132,6 +1132,8 @@ parse_name(const char *input)
> input, bad_char);
> return NULL;
> }
> +
> + regfree(®ex);
> return name;
> }
>
> --
> 1.8.3.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list