r600g: Fix memory leak in r600_shader_select.
authorVinson Lee <vlee@freedesktop.org>
Thu, 21 Feb 2013 07:32:20 +0000 (23:32 -0800)
committerVinson Lee <vlee@freedesktop.org>
Fri, 22 Feb 2013 05:49:24 +0000 (21:49 -0800)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reported-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/gallium/drivers/r600/r600_state_common.c

index c03ce3d86ee30e2efff68d3d62d3c8572cefd2f9..c4bd758d79617774ef22d7903b3974d35609e31e 100644 (file)
@@ -744,6 +744,7 @@ static int r600_shader_select(struct pipe_context *ctx,
                        R600_ERR("Failed to build shader variant (type=%u) %d\n",
                                 sel->type, r);
                        sel->current = NULL;
+                       FREE(shader);
                        return r;
                }