glsl_to_tgsi: fix a reference leak on an error path
authorMarek Olšák <maraeo@gmail.com>
Thu, 25 Aug 2011 02:11:05 +0000 (04:11 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 29 Aug 2011 20:31:10 +0000 (22:31 +0200)
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 22660830a9bdf8db9f175b53e772dbdb99c27140..3fbb0cdd248da4022c18e4ac76e4cc68a3957ef7 100644 (file)
@@ -5050,6 +5050,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
             break;
          }
          if (!ok) {
+            _mesa_reference_program(ctx, &linked_prog, NULL);
             return GL_FALSE;
          }
       }