From: Vinson Lee Date: Sat, 31 Mar 2012 06:36:45 +0000 (-0700) Subject: linker: Fix memory leak in count_uniform_size::visit_field. X-Git-Tag: mesa-9.0~2647 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4123d0b32138a0fbdbc7f61380d041704ba0ad43;p=platform%2Fupstream%2Fmesa.git 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 --- diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 613c9b7a..2f1c9f5 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -173,8 +173,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.