nv30: plug some memory leaks on screen destroy and shader compile
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 18 Jun 2014 02:22:56 +0000 (22:22 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 19 Jun 2014 05:05:52 +0000 (01:05 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c

index fb9378c4ffe00d01aa65bcc43a8b37762f3b8b92..4baabaf72265495067393ade78977dd850aadce8 100644 (file)
@@ -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);
index 4955226db67593bf8414980a2852b20cc4c2dabb..1f1fba202df33b335826061df838881f887a785c 100644 (file)
@@ -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);