llvmpipe: When failing free fs shader too.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 21 Sep 2010 16:51:06 +0000 (17:51 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 21 Sep 2010 16:51:29 +0000 (17:51 +0100)
src/gallium/drivers/llvmpipe/lp_state_fs.c

index fb673db6d0f153e3e60acbf7c9242be0066484c1..4277c47eeb681ffd5e0a05d3ec815a3f42960530 100644 (file)
@@ -906,6 +906,7 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
    shader->draw_data = draw_create_fragment_shader(llvmpipe->draw, templ);
    if (shader->draw_data == NULL) {
       FREE((void *) shader->base.tokens);
+      FREE(shader);
       return NULL;
    }