From: Brian Paul Date: Thu, 4 Sep 2008 21:05:03 +0000 (-0600) Subject: mesa: fix minor mem leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a64440154319738445e203339156e54232908ee;p=mesa.git mesa: fix minor mem leak --- diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 10c5afec189..ec260f18a9f 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: