From: Brian Paul Date: Fri, 10 Jul 2009 18:55:30 +0000 (-0600) Subject: vbo: fix vbo/dlist memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca1b71b78d9c31e9ea7ceed2542ec67f32e6e5c5;p=mesa.git vbo: fix vbo/dlist memory leak Based on a patch by kristof.ralovich@gmail.com --- diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 85cb79c71ce..a7f27062062 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; + } }