From 8537544be93997870b754098ae6527aa6d230ad9 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 30 Mar 2012 23:36:45 -0700 Subject: [PATCH] linker: Fix memory leak in count_uniform_size::visit_field. Fixes a Coverity resource leak defect. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee Reviewed-by: Kenneth Graunke (cherry picked from commit 4123d0b32138a0fbdbc7f61380d041704ba0ad43) --- src/glsl/link_uniforms.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index d51850c216a..588008a8b48 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -174,8 +174,7 @@ private: if (this->map->get(id, name)) return; - char *key = strdup(name); - this->map->put(this->num_active_uniforms, key); + this->map->put(this->num_active_uniforms, name); /* Each leaf uniform occupies one entry in the list of active * uniforms.