nvc0/ir: uses was always null at that point in the code
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 6 Sep 2014 16:14:18 +0000 (12:14 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 9 Sep 2014 00:06:12 +0000 (20:06 -0400)
Reported by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index f13bab1735fbc05d5ae7b1499df907ad7f26b624..29857cffe6ea5f0c2c4662b5d02b7db82aed3d8b 100644 (file)
@@ -309,7 +309,6 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn)
       }
    }
    delete[] uses;
-   uses = NULL;
 
    // insert the barriers
    for (size_t i = 0; i < useVec.size(); ++i) {
@@ -330,11 +329,8 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn)
       }
    }
 
-   if (fn->getProgram()->optLevel < 3) {
-      if (uses)
-         delete[] uses;
+   if (fn->getProgram()->optLevel < 3)
       return true;
-   }
 
    std::vector<Limits> limitT, limitB, limitS; // entry, exit, single
 
@@ -419,8 +415,6 @@ NVC0LegalizePostRA::insertTextureBarriers(Function *fn)
             prev = i;
       }
    }
-   if (uses)
-      delete[] uses;
    return true;
 }