iris: more leak fixes
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Jun 2018 17:04:32 +0000 (10:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index f24e59d5a60d70bc62f47acb20dfdb0e843b2315..4d1b3f1aa8c3f18999b7fb539559e8d4f5c5a3c2 100644 (file)
@@ -1351,6 +1351,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
 
    isl_emit_depth_stencil_hiz_s(isl_dev, cso_z->packets, &info);
 
+   free(ice->state.cso_depthbuffer);
    ice->state.cso_depthbuffer = cso_z;
    ice->state.dirty |= IRIS_DIRTY_DEPTH_BUFFER;
 
@@ -2762,6 +2763,7 @@ iris_destroy_state(struct iris_context *ice)
    }
    pipe_surface_reference(&ice->state.framebuffer.zsbuf, NULL);
 
+   free(ice->state.cso_vp);
    free(ice->state.cso_depthbuffer);
 
    pipe_resource_reference(&ice->state.last_res.cc_vp, NULL);