Mesa (master): r600g: fixed bo memory leak issue

Alex Deucher agd5f at kemper.freedesktop.org
Mon Jun 13 14:51:15 UTC 2011


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

Author: Pierre-Eric Pelloux-Prayer <pelloux at gmail.com>
Date:   Fri Jun 10 13:57:21 2011 +0200

r600g: fixed bo memory leak issue

pipe_resource_reference call was miossing, thus creating massive memory under certain conditions.
Fix : https://bugs.freedesktop.org/show_bug.cgi?id=37168

---

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

diff --git a/src/gallium/drivers/r600/r600_translate.c b/src/gallium/drivers/r600/r600_translate.c
index 7482d15..307fd57 100644
--- a/src/gallium/drivers/r600/r600_translate.c
+++ b/src/gallium/drivers/r600/r600_translate.c
@@ -48,6 +48,7 @@ void r600_translate_index_buffer(struct r600_pipe_context *r600,
 				&r600->context, *index_buffer, 0, *start, count, ptr);
 
 		pipe_resource_reference(index_buffer, out_buffer);
+		pipe_resource_reference(&out_buffer, NULL);
 		*index_size = 2;
 		*start = out_offset / 2;
 		break;




More information about the mesa-commit mailing list