Mesa (master): r600g: Fixed a bo reference leak in the draw module.

Tilman Sauerbeck tilman at kemper.freedesktop.org
Fri Sep 10 11:20:46 UTC 2010


Module: Mesa
Branch: master
Commit: ec2e0fd1e976ce09453ff94dce9d90c970da2069
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec2e0fd1e976ce09453ff94dce9d90c970da2069

Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date:   Thu Sep  9 21:33:37 2010 +0200

r600g: Fixed a bo reference leak in the draw module.

Signed-off-by: Tilman Sauerbeck <tilman at code-monkey.de>

---

 src/gallium/drivers/r600/r600_draw.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_draw.c b/src/gallium/drivers/r600/r600_draw.c
index 1834433..f24f30f 100644
--- a/src/gallium/drivers/r600/r600_draw.c
+++ b/src/gallium/drivers/r600/r600_draw.c
@@ -122,6 +122,9 @@ static int r600_draw_common(struct r600_draw *draw)
 		r600_flush(draw->ctx, 0, NULL);
 		r = radeon_ctx_set_draw(&rctx->ctx, &rctx->draw);
 	}
+
+	radeon_state_fini(&draw->draw);
+
 	return r;
 }
 
@@ -133,6 +136,8 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
 
 	assert(info->index_bias == 0);
 
+	memset(&draw, 0, sizeof(draw));
+
 	draw.ctx = ctx;
 	draw.mode = info->mode;
 	draw.start = info->start;




More information about the mesa-commit mailing list