summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/svga/svga_tgsi.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c
index c62d4d671ef..7396ad08e27 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
@@ -50,15 +50,6 @@
*/
static char err_buf[128];
-#if 0
-static void
-svga_destroy_shader_emitter(struct svga_shader_emitter *emit)
-{
- if (emit->buf != err_buf)
- FREE(emit->buf);
-}
-#endif
-
static boolean
svga_shader_expand(struct svga_shader_emitter *emit)
@@ -265,6 +256,7 @@ svga_tgsi_vgpu9_translate(struct svga_context *svga,
fail:
FREE(variant);
- FREE(emit.buf);
+ if (emit.buf != err_buf)
+ FREE(emit.buf);
return NULL;
}