gallivm: Close a memory leak
authorLauri Kasanen <cand@gmx.com>
Thu, 22 Dec 2011 19:34:39 +0000 (21:34 +0200)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Dec 2011 23:03:18 +0000 (23:03 +0000)
Hi all

This fixes a memory leak of 32 bytes on exit.

From 924f8fdccb41b011f372bc57252005bcdb096105 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <curaga@operamail.com>
Date: Thu, 22 Dec 2011 21:28:33 +0200
Subject: [PATCH] gallivm: Close a memory leak

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

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_init.c

index 45addee8fabb0db31334287ee8b4a3037ca6f396..503c04e107f2d1f0d10894dca400fa96d3819759 100644 (file)
@@ -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;
       }
    }