summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 15:05:03 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 15:05:03 -0600
commit9a64440154319738445e203339156e54232908ee (patch)
tree0c8c935931620b82d8d0d7ae8e4af15656293398
parentdc248fc2881f4443bdc20a3b53b2ad24fee430ec (diff)
mesa: fix minor mem leak
-rw-r--r--src/mesa/shader/prog_print.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 10c5afec18..ec260f18a9 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -250,7 +250,9 @@ reg_string(enum register_file f, GLint index, gl_prog_print_mode mode,
{
struct gl_program_parameter *param
= prog->Parameters->Parameters + index;
- sprintf(str, _mesa_program_state_string(param->StateIndexes));
+ char *state = _mesa_program_state_string(param->StateIndexes);
+ sprintf(str, state);
+ _mesa_free(state);
}
break;
case PROGRAM_ADDRESS: