[Mesa-dev] [PATCH] main: Fix memory leak in _mesa_make_extension_string()
Ian Romanick
idr at freedesktop.org
Mon Apr 9 14:33:58 PDT 2012
On 04/09/2012 02:23 PM, Chad Versace wrote:
> I forgot to free the string returned by strdup().
>
> Note: This is a candidate for the stable branches.
> CC: Johannes Obermayr<johannesobermayr at gmx.de>
> Signed-off-by: Chad Versace<chad.versace at linux.intel.com>
I think the tag should be "mesa:", not "main:". Other than that,
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/main/extensions.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 8c262af..3ce4cd5 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -750,6 +750,8 @@ get_extension_override( struct gl_context *ctx )
> }
> }
>
> + free(env);
> +
> /* Remove trailing space. */
> len = strlen(extra_exts);
> if (extra_exts[len - 1] == ' ')
More information about the mesa-dev
mailing list