Mesa (master): nv30: plug some memory leaks on screen destroy and shader compile

Ilia Mirkin imirkin at kemper.freedesktop.org
Thu Jun 19 05:25:56 UTC 2014


Module: Mesa
Branch: master
Commit: 5af80f62680b8321c3af565bb57138a71429502c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5af80f62680b8321c3af565bb57138a71429502c

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue Jun 17 22:22:56 2014 -0400

nv30: plug some memory leaks on screen destroy and shader compile

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>

---

 src/gallium/drivers/nouveau/nv30/nv30_screen.c   |    6 ++++++
 src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c |    1 +
 2 files changed, 7 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index fb9378c..4baabaf 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -327,6 +327,12 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
       nouveau_fence_ref(NULL, &screen->base.fence.current);
    }
 
+   nouveau_bo_ref(NULL, &screen->notify);
+
+   nouveau_heap_destroy(&screen->query_heap);
+   nouveau_heap_destroy(&screen->vp_exec_heap);
+   nouveau_heap_destroy(&screen->vp_data_heap);
+
    nouveau_object_del(&screen->query);
    nouveau_object_del(&screen->fence);
    nouveau_object_del(&screen->ntfy);
diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
index 4955226..1f1fba2 100644
--- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
+++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
@@ -1225,6 +1225,7 @@ out:
    if(fpc)
    {
       FREE(fpc->r_temp);
+      FREE(fpc->r_imm);
       util_dynarray_fini(&fpc->if_stack);
       util_dynarray_fini(&fpc->label_relocs);
       util_dynarray_fini(&fpc->imm_data);




More information about the mesa-commit mailing list