string_to_uint_map::put() already does a strdup() for the key argument, so we leak the memory allocated by strdup() in link_uniforms.cpp.
Remove the extra strdup(), fixes a few Valgrind detected leaks. Signed-off-by: Pekka Paalanen <ppaala...@gmail.com> --- src/glsl/link_uniforms.cpp | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index c7de480..f6094d7 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. -- 1.7.3.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev