summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-07-10 12:55:30 -0600
committerBrian Paul <brianp@vmware.com>2009-07-10 13:09:09 -0600
commitca1b71b78d9c31e9ea7ceed2542ec67f32e6e5c5 (patch)
tree34d1ee79d51727b8c560f0dd9d90692cfa06a3ce
parent6ff1a5385ee2a2f3c612254254bf5c1e4f4e593a (diff)
vbo: fix vbo/dlist memory leak
Based on a patch by kristof.ralovich@gmail.com
-rw-r--r--src/mesa/vbo/vbo_save_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 85cb79c71c..a7f2706206 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1144,6 +1144,11 @@ static void vbo_destroy_vertex_list( GLcontext *ctx, void *data )
if ( --node->prim_store->refcount == 0 )
FREE( node->prim_store );
+
+ if (node->current_data) {
+ FREE(node->current_data);
+ node->current_data = NULL;
+ }
}