mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
i915: clean up lists on teardown
also fix a use of uninitialised pointer
This commit is contained in:
parent
4e1c76de0b
commit
4611b9398e
1 changed files with 4 additions and 3 deletions
|
|
@ -160,7 +160,6 @@ static int intel_adjust_list_nodes(struct intel_bo_list *list)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void intel_bo_free_list(struct intel_bo_list *list)
|
||||
{
|
||||
struct intel_bo_node *node;
|
||||
|
|
@ -185,7 +184,6 @@ void intel_bo_free_list(struct intel_bo_list *list)
|
|||
list->numCurrent--;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int intel_bo_reset_list(struct intel_bo_list *list)
|
||||
{
|
||||
|
|
@ -218,7 +216,7 @@ static int intel_create_bo_list(int numTarget, struct intel_bo_list *list, void
|
|||
list->numTarget = numTarget;
|
||||
list->numCurrent = 0;
|
||||
list->numOnList = 0;
|
||||
if (list->destroy)
|
||||
if (destroy)
|
||||
list->destroy = destroy;
|
||||
else
|
||||
list->destroy = generic_destroy;
|
||||
|
|
@ -840,6 +838,9 @@ dri_bufmgr_ttm_destroy(dri_bufmgr *bufmgr)
|
|||
{
|
||||
dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)bufmgr;
|
||||
|
||||
intel_bo_free_list(&bufmgr_ttm->list);
|
||||
intel_bo_free_list(&bufmgr_ttm->reloc_list);
|
||||
|
||||
_glthread_DESTROY_MUTEX(bufmgr_ttm->mutex);
|
||||
free(bufmgr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue