From 36fef005b191fcd3fa858abb5f2aa6e7229e2c60 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 9 Apr 2012 13:59:03 -0700 Subject: [PATCH] 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 --- src/mesa/main/extensions.c | 2 ++ 1 file changed, 2 insertions(+) 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] == ' ') -- 2.30.2