From: Chad Versace Date: Mon, 9 Apr 2012 20:59:03 +0000 (-0700) Subject: main: Fix memory leak in _mesa_make_extension_string() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36fef005b191fcd3fa858abb5f2aa6e7229e2c60;p=mesa.git main: Fix memory leak in _mesa_make_extension_string() I forgot to free the string returned by strdup(). Note: This is a candidate for the stable branches. CC: Johannes Obermayr Reviewed-by: Ian Romanick Signed-off-by: Chad Versace --- diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 8c262af081f..3ce4cd5596c 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] == ' ')