glsl: fix mem leak
authorBrian Paul <brianp@vmware.com>
Thu, 1 Oct 2009 20:50:45 +0000 (14:50 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 1 Oct 2009 20:50:45 +0000 (14:50 -0600)
src/mesa/shader/slang/slang_link.c

index 8f2b40d5dfbc6885c62cf79e62c5316fe0fee400..71038d2d94efc80623e73de55b9ad8e3ac95502d 100644 (file)
@@ -670,6 +670,7 @@ get_main_shader(GLcontext *ctx,
           !shader->Main ||
           shader->UnresolvedRefs) {
          link_error(shProg, "Unresolved symbols");
+         _mesa_free_shader(ctx, shader);
          return NULL;
       }
    }