Merge pull request #1661 from dneto0/fix-leak

Avoid leaking name for counter buffer
This commit is contained in:
John Kessenich 2019-01-17 05:29:31 +07:00 committed by GitHub
commit 7f2a87e58c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3208,7 +3208,7 @@ void HlslParseContext::declareStructBufferCounter(const TSourceLoc& loc, const T
TType blockType;
counterBufferType(loc, blockType);
TString* blockName = new TString(intermediate.addCounterBufferName(name));
TString* blockName = NewPoolTString(intermediate.addCounterBufferName(name).c_str());
// Counter buffer is not yet in use
structBufferCounter[*blockName] = false;