gallium/util: Fix memory leak
authorAaron Watry <awatry@gmail.com>
Tue, 4 Mar 2014 23:12:19 +0000 (17:12 -0600)
committerAaron Watry <awatry@gmail.com>
Thu, 6 Mar 2014 17:38:26 +0000 (11:38 -0600)
Fix a leaked vertex shader in u_blitter.c

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
CC: "10.1" <mesa-stable@lists.freedesktop.org>
src/gallium/auxiliary/util/u_blitter.c

index 95e7fb6313a4260b8124bded60df35c9f0987fc9..66b511eb53699b564ec8141f6ad48804a860a220 100644 (file)
@@ -364,6 +364,8 @@ void util_blitter_destroy(struct blitter_context *blitter)
    pipe->delete_vs_state(pipe, ctx->vs);
    if (ctx->vs_pos_only)
       pipe->delete_vs_state(pipe, ctx->vs_pos_only);
+   if (ctx->vs_layered)
+      pipe->delete_vs_state(pipe, ctx->vs_layered);
    pipe->delete_vertex_elements_state(pipe, ctx->velem_state);
    for (i = 0; i < 4; i++) {
       if (ctx->velem_state_readbuf[i]) {