[Mesa-dev] [PATCH] i965: Don't bother freeing NULL.

Matt Turner mattst88 at gmail.com
Sat Apr 11 10:23:43 PDT 2015


Commit e16c5c90 was replacing 'region' with 'mt', leaving this
nonsensical code.
---
 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 eb226d5..540f015 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -725,10 +725,8 @@ intel_miptree_create_for_bo(struct brw_context *brw,
                                     0, 0,
                                     width, height, depth,
                                     true, 0, false);
-   if (!mt) {
-      free(mt);
-      return mt;
-   }
+   if (!mt)
+      return NULL;
 
    drm_intel_bo_reference(bo);
    mt->bo = bo;
-- 
2.0.5



More information about the mesa-dev mailing list