30 lines
970 B
Diff
30 lines
970 B
Diff
commit 955906aa647d0d233b422c979e1ee81dc32abb87
|
|
Author: Brian <brian@yutani.localnet.net>
|
|
Date: Tue Mar 6 16:25:07 2007 -0700
|
|
|
|
fix renderbuffer mem leak
|
|
|
|
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
|
|
index a358ec2..747971a 100644
|
|
--- a/src/mesa/drivers/x11/xm_buffer.c
|
|
+++ b/src/mesa/drivers/x11/xm_buffer.c
|
|
@@ -418,6 +418,18 @@ xmesa_delete_framebuffer(struct gl_frame
|
|
XMesaDestroyImage( b->rowimage );
|
|
}
|
|
|
|
+ /* Note that XMesaBuffer renderbuffers normally have a refcount of 2
|
|
+ * (creation + binding) so we need to explicitly delete/unbind them here.
|
|
+ */
|
|
+ if (b->frontxrb) {
|
|
+ _mesa_unreference_renderbuffer((struct gl_renderbuffer **) &b->frontxrb);
|
|
+ ASSERT(b->frontxrb == NULL);
|
|
+ }
|
|
+ if (b->backxrb) {
|
|
+ _mesa_unreference_renderbuffer((struct gl_renderbuffer **) &b->backxrb);
|
|
+ ASSERT(b->backxrb == NULL);
|
|
+ }
|
|
+
|
|
_mesa_free_framebuffer_data(fb);
|
|
_mesa_free(fb);
|
|
}
|