[Mesa-dev] [PATCH] mesa: avoid leaking closure when iterating over a string_to_uint_map

Ilia Mirkin imirkin at alum.mit.edu
Thu Oct 1 17:19:04 PDT 2015


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/mesa/program/hash_table.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h
index e85a836..d0a2abf 100644
--- a/src/mesa/program/hash_table.h
+++ b/src/mesa/program/hash_table.h
@@ -249,6 +249,7 @@ public:
       wrapper->closure = closure;
 
       hash_table_call_foreach(this->ht, subtract_one_wrapper, wrapper);
+      free(wrapper);
    }
 
    /**
-- 
2.4.9



More information about the mesa-dev mailing list