main: Fix memory leak in _mesa_make_extension_string()
authorChad Versace <chad.versace@linux.intel.com>
Mon, 9 Apr 2012 20:59:03 +0000 (13:59 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 10 Apr 2012 00:31:51 +0000 (17:31 -0700)
I forgot to free the string returned by strdup().

Note: This is a candidate for the stable branches.
CC: Johannes Obermayr <johannesobermayr@gmx.de>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/main/extensions.c

index 8c262af081f8f8c784071853df9af1a63c75cc5e..3ce4cd5596ce9e98b7d45dc24d97744fed1555d1 100644 (file)
@@ -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] == ' ')