From: Maciej Cencora Date: Sun, 27 Sep 2009 20:18:49 +0000 (+0200) Subject: r300g: plug memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c8b77a5f3ec1dac0bddc98da3ccbb64f58f22e0;p=mesa.git r300g: plug memory leak --- 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,