Fix memory leak upon ProcessDeferred failure.

This commit is contained in:
siavashserver 2018-03-08 09:13:36 +03:30 committed by GitHub
parent a51525059f
commit b502a802f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -840,8 +840,13 @@ bool ProcessDeferred(
// Add built-in symbols that are potentially context dependent; // Add built-in symbols that are potentially context dependent;
// they get popped again further down. // they get popped again further down.
if (! AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion, if (! AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion,
stage, source)) stage, source)) {
delete symbolTableMemory;
delete [] lengths;
delete [] strings;
delete [] names;
return false; return false;
}
// //
// Now we can process the full shader under proper symbols and rules. // Now we can process the full shader under proper symbols and rules.