summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i915/intel_bufmgr_ttm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_bufmgr_ttm.c b/src/mesa/drivers/dri/i915/intel_bufmgr_ttm.c
index 466dc1ec32..990c58aa25 100644
--- a/src/mesa/drivers/dri/i915/intel_bufmgr_ttm.c
+++ b/src/mesa/drivers/dri/i915/intel_bufmgr_ttm.c
@@ -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);
}