summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-10-05 14:33:18 +1000
committerDave Airlie <airlied@redhat.com>2007-10-05 14:33:18 +1000
commit4611b9398e6164ea419bf587e759a354be4c58b4 (patch)
tree4bb3e3e06c4d9e28b30fbcec85cc7f7ef796a30f /src/mesa/drivers
parent4e1c76de0bf767857737116a0ec908cb8d35083e (diff)
i915: clean up lists on teardown
also fix a use of uninitialised pointer
Diffstat (limited to 'src/mesa/drivers')
-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);
}