diff options
author | Carl Worth <cworth@cworth.org> | 2008-10-30 16:53:57 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-11-03 22:46:28 -0800 |
commit | 47cc3d79da8174ba30ca130b0fb6c7d9c871caed (patch) | |
tree | a33317cd6c9fba9b0c26d996de98259bc7bed9c4 | |
parent | 88700acf30f9eab8f96c197c7d113ce38c0af6e7 (diff) |
Unreference the vertex_buffer_bo in gen4_render_state_cleanup
This avoids leaking one buffer object.
-rw-r--r-- | src/i965_render.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index 3ebd209a..b28b2cee 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1617,12 +1617,16 @@ void gen4_render_state_cleanup(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); + struct gen4_render_state *render_state= pI830->gen4_render_state; + + if (render_state->vertex_buffer_bo) + dri_bo_unreference (render_state->vertex_buffer_bo); if (pI830->use_drm_mode) { dri_bo_unmap(pI830->gen4_render_state_mem->bo); dri_bo_unreference(pI830->gen4_render_state_mem->bo); } - pI830->gen4_render_state->static_state = NULL; + render_state->static_state = NULL; } unsigned int |