Commit aa02848b by Nicolas Capens Committed by Nicolas Capens

Fix memory leak on error.

Bug chromium:805881 Change-Id: I2729fd81dbf2ac40bcfb5a0781cf57daefc4f75a Reviewed-on: https://swiftshader-review.googlesource.com/16748Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent b64e0ceb
......@@ -402,7 +402,10 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
node->setLeft(left);
node->setRight(right);
if (!node->promote(infoSink))
{
delete node;
return 0;
}
//
// See if we can fold constants.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment