[PATCH] gallivm: Close a memory leak

Lauri Kasanen curaga at operamail.com
Thu Dec 22 11:28:33 PST 2011


As reported by "valgrind --leak-check=full glxgears".

Signed-off-by: Lauri Kasanen <curaga at operamail.com>
---
 src/gallium/auxiliary/gallivm/lp_bld_init.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 45addee..503c04e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -345,6 +345,7 @@ gallivm_remove_garbage_collector_callback(garbage_collect_callback_func func,
       if (cb->func == func && cb->cb_data == cb_data) {
          /* found, remove it */
          remove_from_list(cb);
+         FREE(cb);
          return;
       }
    }
-- 
1.7.2.1



More information about the mesa-dev mailing list