mesa: fix memory leak in arb_fragment_program
authorBartosz Tomczyk <bartosz.tomczyk86@gmail.com>
Sun, 9 Apr 2017 16:37:13 +0000 (18:37 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 12 Apr 2017 07:50:36 +0000 (17:50 +1000)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/program/arbprogparse.c

index 07bdf1603efac8f59cbdf4def8e70a9981af6560..83a501eea69884beffa48a71c5c45eea98a05e80 100644 (file)
@@ -78,6 +78,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
    memset(&prog, 0, sizeof(prog));
    memset(&state, 0, sizeof(state));
    state.prog = &prog;
+   state.mem_ctx = program;
 
    if (!_mesa_parse_arb_program(ctx, target, (const GLubyte*) str, len,
                                &state)) {