Merge pull request #1283 from siavashserver/fix-memory-leak

Fix memory leak upon ProcessDeferred failure.
This commit is contained in:
John Kessenich 2018-03-08 10:55:02 -07:00 committed by GitHub
commit 845860d565
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;
// they get popped again further down.
if (! AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion,
stage, source))
stage, source)) {
delete symbolTableMemory;
delete [] lengths;
delete [] strings;
delete [] names;
return false;
}
//
// Now we can process the full shader under proper symbols and rules.