aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program/nvfragparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/program/nvfragparse.c')
-rw-r--r--src/mesa/program/nvfragparse.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/program/nvfragparse.c b/src/mesa/program/nvfragparse.c
index ab69a04fcf0..f251d7e6c9a 100644
--- a/src/mesa/program/nvfragparse.c
+++ b/src/mesa/program/nvfragparse.c
@@ -1549,14 +1549,10 @@ _mesa_parse_nv_fragment_program(struct gl_context *ctx, GLenum dstTarget,
/* install the program */
program->Base.Target = target;
- if (program->Base.String) {
- free(program->Base.String);
- }
+ free(program->Base.String);
program->Base.String = programString;
program->Base.Format = GL_PROGRAM_FORMAT_ASCII_ARB;
- if (program->Base.Instructions) {
- free(program->Base.Instructions);
- }
+ free(program->Base.Instructions);
program->Base.Instructions = newInst;
program->Base.NumInstructions = parseState.numInst;
program->Base.InputsRead = parseState.inputsRead;