nv30: avoid leaking blit fp/vp
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 29 Jun 2015 04:23:55 +0000 (00:23 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 29 Jun 2015 04:46:53 +0000 (00:46 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv30/nv30_context.c

index 617b08878101fd4245ccf93389d84194ad0f326a..ef035e58f3cf8894e127b23ba697c4c920ac4883 100644 (file)
@@ -165,6 +165,12 @@ nv30_context_destroy(struct pipe_context *pipe)
    if (nv30->draw)
       draw_destroy(nv30->draw);
 
+   if (nv30->blit_vp)
+      nouveau_heap_free(&nv30->blit_vp);
+
+   if (nv30->blit_fp)
+      pipe_resource_reference(&nv30->blit_fp, NULL);
+
    if (nv30->screen->base.pushbuf->user_priv == &nv30->bufctx)
       nv30->screen->base.pushbuf->user_priv = NULL;