Mesa (master): glsl_to_tgsi: fix a reference leak on an error path

Marek Olšák mareko at kemper.freedesktop.org
Mon Aug 29 13:31:46 PDT 2011


Module: Mesa
Branch: master
Commit: b2064ff3115afa075021902ecd35f4a5a772dc9e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b2064ff3115afa075021902ecd35f4a5a772dc9e

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Aug 25 04:11:05 2011 +0200

glsl_to_tgsi: fix a reference leak on an error path

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 2266083..3fbb0cd 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -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;
          }
       }



More information about the mesa-commit mailing list