u_blitter: fix resource leak
authorMarek Olšák <maraeo@gmail.com>
Sun, 29 Apr 2012 15:31:27 +0000 (17:31 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 29 Apr 2012 15:31:27 +0000 (17:31 +0200)
src/gallium/auxiliary/util/u_blitter.c

index 6a9141209bbe9058f2e896adf40a2bc4263f6bc2..d0b9187d1f9c7acc7558eb97359d1eb964e13fec 100644 (file)
@@ -733,6 +733,7 @@ static void blitter_draw(struct blitter_context_priv *ctx,
    u_upload_unmap(ctx->upload);
    util_draw_vertex_buffer(ctx->base.pipe, NULL, buf, offset,
                            PIPE_PRIM_TRIANGLE_FAN, 4, 2);
+   pipe_resource_reference(&buf, NULL);
 }
 
 static void blitter_draw_rectangle(struct blitter_context *blitter,