From: Thomas Hindoe Paaboel Andersen Date: Wed, 4 May 2016 04:15:37 +0000 (+0200) Subject: mesa: remove null check before free X-Git-Tag: upstream/17.1.0~10233 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76a423efe09dcaeb86badd3ec449da2ea56c5a9c;p=platform%2Fupstream%2Fmesa.git mesa: remove null check before free Reviewed-by: Eduardo Lima Mitev --- 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); }