X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fshader%2Farbprogparse.c;h=dd732b6666bc07afa011c52929d68fca17f15b6a;hb=766f3ccbda7def1a81a3d07002e500e8bb1a898e;hp=05ee4f563eb7a2fe8b40bb8c1ab76e03a882da98;hpb=a512985fd81c1ed4ccc5e69aaa05015cf7ff844d;p=mesa.git diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 05ee4f563eb..dd732b6666b 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -87,6 +87,9 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, return; } + if (program->Base.String != NULL) + _mesa_free(program->Base.String); + /* Copy the relevant contents of the arb_program struct into the * fragment_program struct. */ @@ -178,6 +181,9 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, return; } + if (program->Base.String != NULL) + _mesa_free(program->Base.String); + /* Copy the relevant contents of the arb_program struct into the * vertex_program struct. */