[Mesa-dev] [PATCH 3/3] mesa: remove null check before free
Thomas Hindoe Paaboel Andersen
phomes at gmail.com
Wed May 4 04:15:37 UTC 2016
---
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);
}
--
2.7.4
More information about the mesa-dev
mailing list