From: Marcin Slusarz Date: Tue, 12 Jan 2010 14:41:50 +0000 (+0100) Subject: nv50/nv40/nv30: fix small memory leak of nouveau_resources on screen_destroy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=112def3c17a45f73def02c17509d68b46ff25966;p=mesa.git nv50/nv40/nv30: fix small memory leak of nouveau_resources on screen_destroy Signed-off-by: Francisco Jerez --- diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c index ee83ec56760..62ee2e7697a 100644 --- a/src/gallium/drivers/nv30/nv30_screen.c +++ b/src/gallium/drivers/nv30/nv30_screen.c @@ -173,9 +173,9 @@ nv30_screen_destroy(struct pipe_screen *pscreen) so_ref(NULL, &screen->state[i]); } - nouveau_resource_free(&screen->vp_exec_heap); - nouveau_resource_free(&screen->vp_data_heap); - nouveau_resource_free(&screen->query_heap); + nouveau_resource_destroy(&screen->vp_exec_heap); + nouveau_resource_destroy(&screen->vp_data_heap); + nouveau_resource_destroy(&screen->query_heap); nouveau_notifier_free(&screen->query); nouveau_notifier_free(&screen->sync); nouveau_grobj_free(&screen->rankine); diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c index b1a7343b409..56fb80975cc 100644 --- a/src/gallium/drivers/nv40/nv40_screen.c +++ b/src/gallium/drivers/nv40/nv40_screen.c @@ -157,9 +157,9 @@ nv40_screen_destroy(struct pipe_screen *pscreen) so_ref(NULL, &screen->state[i]); } - nouveau_resource_free(&screen->vp_exec_heap); - nouveau_resource_free(&screen->vp_data_heap); - nouveau_resource_free(&screen->query_heap); + nouveau_resource_destroy(&screen->vp_exec_heap); + nouveau_resource_destroy(&screen->vp_data_heap); + nouveau_resource_destroy(&screen->query_heap); nouveau_notifier_free(&screen->query); nouveau_notifier_free(&screen->sync); nouveau_grobj_free(&screen->curie); diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index c4465a228ca..48c7b19584f 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -195,6 +195,9 @@ nv50_screen_destroy(struct pipe_screen *pscreen) nouveau_grobj_free(&screen->tesla); nouveau_grobj_free(&screen->eng2d); nouveau_grobj_free(&screen->m2mf); + nouveau_resource_destroy(&screen->immd_heap[0]); + nouveau_resource_destroy(&screen->parm_heap[0]); + nouveau_resource_destroy(&screen->parm_heap[1]); nouveau_screen_fini(&screen->base); FREE(screen); }