From 8c8b77a5f3ec1dac0bddc98da3ccbb64f58f22e0 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sun, 27 Sep 2009 22:18:49 +0200 Subject: r300g: plug memory leak --- src/gallium/drivers/r300/r300_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/r300') diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 737396d8d97..16f64040129 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -81,6 +81,7 @@ static boolean r300_render_allocate_vertices(struct vbuf_render* render, if (size + r300render->vbo_offset > r300render->vbo_size) { + pipe_buffer_reference(&r300->vbo, NULL); r300render->vbo = pipe_buffer_create(screen, 64, PIPE_BUFFER_USAGE_VERTEX, @@ -129,7 +130,6 @@ static void r300_render_release_vertices(struct vbuf_render* render) r300render->vbo_offset += r300render->vbo_max_used; r300render->vbo_max_used = 0; - r300->vbo = NULL; } static boolean r300_render_set_primitive(struct vbuf_render* render, -- cgit v1.2.3