mesa: remove null check before free
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 4 May 2016 04:15:37 +0000 (06:15 +0200)
committerEduardo Lima Mitev <elima@igalia.com>
Thu, 5 May 2016 07:50:38 +0000 (09:50 +0200)
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/mesa/main/readpix.c
src/mesa/main/texgetimage.c

index 882d863c1c7c658ea78d149e4d7901891dea65d7..1cb06c78a5a8fea8147bf2141235a83531101a9d 100644 (file)
@@ -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 */
index 4ac0ad4b7f5084ac67a5806123ce3b2ee20658d2..fc3cc6b6e1752b21e5b3bef5c9ab7de9cde71097 100644 (file)
@@ -557,8 +557,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
    }
 
 done:
-   if (rgba)
-      free(rgba);
+   free(rgba);
 }