This patch plugs a leak triggerable by display lists. I am not
familiar with this part of mesa, maybe there are better ways to do
this, in that case regard the patch as a pointer to the problem.

Tested and works with sauerbraten and gears.

Please review!

Thanks,
Kristof

>From 5567e4ea594d95bd76b4df9feb408b49a466d378 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?RALOVICH,=20Krist=C3=B3f?= <tad...@freemail.hu>
Date: Wed, 1 Jul 2009 19:35:39 +0200
Subject: [PATCH 4/8] vbo: plug a leak

---
 src/mesa/vbo/vbo_save_api.c |    5 +++++
 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 3c4c8ac..d0f4949 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -380,6 +380,11 @@ static void _save_compile_vertex_list( GLcontext *ctx )
    /* Reset our structures for the next run of vertices:
     */
    _save_reset_counters( ctx );
+
+   if (node->current_data) {
+     FREE(node->current_data);
+     node->current_data=0;
+   }
 }


-- 
1.6.3.3
From 5567e4ea594d95bd76b4df9feb408b49a466d378 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?RALOVICH,=20Krist=C3=B3f?= <tad...@freemail.hu>
Date: Wed, 1 Jul 2009 19:35:39 +0200
Subject: [PATCH 4/8] vbo: plug a leak

---
 src/mesa/vbo/vbo_save_api.c |    5 +++++
 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 3c4c8ac..d0f4949 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -380,6 +380,11 @@ static void _save_compile_vertex_list( GLcontext *ctx )
    /* Reset our structures for the next run of vertices:
     */
    _save_reset_counters( ctx );
+
+   if (node->current_data) {
+     FREE(node->current_data);
+     node->current_data=0;
+   }
 }
 
 
-- 
1.6.3.3

------------------------------------------------------------------------------
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to