summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-10-05 12:53:07 -0700
committerEric Anholt <eric@anholt.net>2007-10-05 12:53:07 -0700
commitdfa22df8ce7713b491c4766ce6ce652db91b5f90 (patch)
tree674242d827245616663e6c36e9e9ebe7a7ebc513
parent7db9d706a1bc9da7afc4823cee92b23e96ae55b8 (diff)
Don't leak buffer object allocations in i830_reset_allocations().
-rw-r--r--src/i830_memory.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index c850033b..d2aa3270 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -272,6 +272,14 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
while (pI830->memory_list->next->next != NULL)
i830_free_memory(pScrn, pI830->memory_list->next);
+ /* Free any allocations in buffer objects */
+#ifdef XF86DRI_MM
+ if (pI830->memory_manager) {
+ while (pI830->bo_list != NULL)
+ i830_free_memory(pScrn, pI830->bo_list);
+ }
+#endif
+
/* Null out the pointers for all the allocations we just freed. This is
* kind of gross, but at least it's just one place now.
*/