[Mesa-dev] [PATCH] mesa: Fix memory leak on error path.

Brian Paul brianp at vmware.com
Fri Dec 16 07:42:45 PST 2011


On 12/16/2011 07:45 AM, Vinson Lee wrote:
> Fixes Coverity resource leak defect.
>
> Signed-off-by: Vinson Lee<vlee at vmware.com>
> ---
>   src/mesa/program/prog_parameter_layout.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/program/prog_parameter_layout.c b/src/mesa/program/prog_parameter_layout.c
> index 28fca3b..e4f2db3 100644
> --- a/src/mesa/program/prog_parameter_layout.c
> +++ b/src/mesa/program/prog_parameter_layout.c
> @@ -138,6 +138,7 @@ _mesa_layout_parameters(struct asm_parser_state *state)
>   		      inst->SrcReg[i].Symbol->param_binding_length);
>
>   	       if (new_begin<  0) {
> +		  _mesa_free_parameter_list(layout);
>   		  return GL_FALSE;
>   	       }
>

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list