Mesa (master): i965: Don't bother freeing NULL.

Matt Turner mattst88 at kemper.freedesktop.org
Mon Apr 13 16:07:47 UTC 2015


Module: Mesa
Branch: master
Commit: 1c9db39d54508608ea9518bc82eacbd8e27c410c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c9db39d54508608ea9518bc82eacbd8e27c410c

Author: Matt Turner <mattst88 at gmail.com>
Date:   Sat Apr 11 10:05:31 2015 -0700

i965: Don't bother freeing NULL.

Commit e16c5c90 was replacing 'region' with 'mt', leaving this
nonsensical code.

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

---

 src/mesa/drivers/dri/i965/intel_mipmap_tree.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index c0a3452..0424a87 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -749,10 +749,8 @@ intel_miptree_create_for_bo(struct brw_context *brw,
                                     width, height, depth,
                                     true, 0, false,
                                     disable_aux_buffers);
-   if (!mt) {
-      free(mt);
-      return mt;
-   }
+   if (!mt)
+      return NULL;
 
    drm_intel_bo_reference(bo);
    mt->bo = bo;




More information about the mesa-commit mailing list