[Mesa-dev] [PATCH 3/3] mesa: remove null check before free
Eduardo Lima Mitev
elima at igalia.com
Wed May 4 05:54:30 UTC 2016
Patch 2 and 3 are:
Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
I barely know about coccinelle scripts so I will let others look at
first patch.
Thanks
Eduardo
On 05/04/2016 06:15 AM, Thomas Hindoe Paaboel Andersen wrote:
> ---
> src/mesa/main/readpix.c | 3 +--
> src/mesa/main/texgetimage.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> index 882d863..1cb06c7 100644
> --- a/src/mesa/main/readpix.c
> +++ b/src/mesa/main/readpix.c
> @@ -608,8 +608,7 @@ read_rgba_pixels( struct gl_context *ctx,
> dst, format, type);
> }
>
> - if (rgba)
> - free(rgba);
> + free(rgba);
>
> done_swap:
> /* Handle byte swapping if required */
> diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
> index 4ac0ad4..fc3cc6b 100644
> --- a/src/mesa/main/texgetimage.c
> +++ b/src/mesa/main/texgetimage.c
> @@ -557,8 +557,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
> }
>
> done:
> - if (rgba)
> - free(rgba);
> + free(rgba);
> }
>
>
>
More information about the mesa-dev
mailing list