Reviewed-by: Tapani Pälli <tapani.pa...@intel.com> On 09/02/2014 02:55 AM, Dave Airlie wrote: > From: Dave Airlie <airl...@redhat.com> > > If we fails in reserve_explicit_locations, we leak uniform_map. > > Reported-by: coverity scanner. > > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > src/glsl/linker.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp > index d5473ad..57be493 100644 > --- a/src/glsl/linker.cpp > +++ b/src/glsl/linker.cpp > @@ -2439,8 +2439,10 @@ check_explicit_uniform_locations(struct gl_context > *ctx, > ir_variable *var = node->as_variable(); > if ((var && var->data.mode == ir_var_uniform) && > var->data.explicit_location) { > - if (!reserve_explicit_locations(prog, uniform_map, var)) > + if (!reserve_explicit_locations(prog, uniform_map, var)) { > + delete uniform_map; > return; > + } > } > } > }
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev