Don't leak buffer object allocations in i830_reset_allocations().

This commit is contained in:
Eric Anholt 2007-10-05 12:53:07 -07:00
parent 7db9d706a1
commit dfa22df8ce
1 changed files with 8 additions and 0 deletions

View File

@ -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.
*/