[Mesa-dev] [PATCH] g3dvl: Fix memory leaks on error paths.
Brian Paul
brianp at vmware.com
Fri Nov 4 08:14:43 PDT 2011
On 11/03/2011 10:12 PM, Vinson Lee wrote:
> Fixes Coverity resource leak defect.
> ---
> src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
> index d4b8ae0..2442d78 100644
> --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
> +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
> @@ -1116,11 +1116,14 @@ vl_create_mpeg12_decoder(struct pipe_context *context,
>
> default:
> assert(0);
> + FREE(dec);
> return NULL;
> }
>
> - if (!format_config)
> + if (!format_config) {
> + FREE(dec);
> return NULL;
> + }
>
> if (!init_zscan(dec, format_config))
> goto error_zscan;
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list